by CodeChum Admin
I'm bored with just basic counting. How about we do some complex things this time? But I don't want to be associated with any number that's not divisible by 3.
Think you can handle this?
Instructions:
Instructions
Output
Multiple lines containing an integer that is divisible by 3.
3
6
9
12
15
18
21
24
27
30
33
36
39
42
45
48
51
54
57
60
63
66
69
72
75
78
81
84
87
90
93
96
99by CodeChum Admin
For those of you who may not now, a factorial is a product of multiplying from 1 until the number. Now, you must make a program that will accept an integer and then print out its factorial using loops.
Are you up for this task?
Instructions:
Input
A line containing an integer.
5Output
A line containing an integer.
120by CodeChum Admin
Instructions:
Instructions
Input
A line containing an integer.
15Output
Multiple lines containing a string.
Fizz
Buzz
Fizz
Fizz
Buzz
Fizz
FizzBuzzCreate a program using a Java console application name it "Alphabetizer". The program should ask the user to enter is name and surname.
Create a method called emptySpace () this remove space between the name and the surname (Use a regular expression "replaceAll"). The emptySpace() method also Count the number of characters within the newly created string (nameSurname) and return the total number of Characters .
The total number of characters (Name and Surname) should be the size of your arrayAlphabetizer (type integer). Populate your arrayAlphabetizer with a series of random numbers between 10 and 50.
Display all arrayAlphabetizer elements and they are corresponding indexes before executing the sort() method and after executing the sort(). Allow the user to enter a value from the arrayAlphabetizer element to search for.
Loop through the array until you find the value and replace that value with the character @.
Print out arrayAlphabetizer with the replaced element..
"IF ELSE - ELSE IF STATEMENT"
Input
A line containing three integers is separated by a space.
6 1 3Output
A line containing three integers is separated by a space.
1 3 6by CodeChum Admin
Looping a number and taking away each digit of it is so much fun, but I wanted to try out a much more complex task: getting the largest digit among them all.
Think you can handle the job?
Instructions:
Input
A line containing an integer.
214Output
A line containing an integer.
4Create a short program that will print 123467.89 as currency using NumberFormat.
Sample Output:
------------------------------------------------------------------
I have ₱1,234,567.89 in my bank account.
Create a short program that will generate a random number from 0 to 100 while using Math.random and Math.round command.
Submit your answers by attaching a screenshot of your program's source code and 3 screenshot of it's output.
Write a program that declares and initializes an array of 7 integers. The program uses these static methods to perform different operations on the array:
void printArray(int[] arr) – takes the array as parameter and prints the array in horizontal order
int sumOfArray(int[] arr) – takes the array as parameter and returns the sum of the array
int getHighest(int[] arr) – takes the array as parameter and returns the highest value in the array
int resetArray(int[] arr) – takes the array as parameter and resets the value of each element to 0
Sample output:
Here’s the array:
3 1 3 2 1 9 1
Sum: 20
Highest: 9
Here’s the array:
0 0 0 0 0 0 0
Create a program that will allow the user to input ten numbers into an array, using values of 0 to 99, and print out all numbers except for the largest number and the smallest number.
Sample Output:
Enter the Numbers >> 10 20 10 40 50 60 70 80 90 99
Output >> 20 40 50 60 70 80 90
Try Again Y/N?