Create a short program that will print 123467.89 as currency using NumberFormat
by CodeChum Admin
Whole numbers are great, but I think we should also pay attention to decimal numbers, too.
So, how about we make a program that involves a lot of decimals?
Instructions:
Instructions
Input
Multiple lines containing float number on each.
1.1
1.2
1.3
1.4
-1.0
Output
A line containing a float number with two decimal places.
4.00
Create a class named Apartment that holds an apartment number, number of bedrooms, number of baths, and rent amount. Create a constructor that accepts values for each data field. Also create a get method for each field. Write an application that creates at least five Apartment objects. Then prompt a user to enter a minimum number of bedrooms required, a minimum number of baths required, and a maximum rent that the user is willing to pay. Display data for all the Apartment objects that meet the user’s criteria or an appropriate message if no such apartments are available. Save the files as Apartment.java and TestApartments.java
by CodeChum Admin
You know, I was lying when I said the last time that numbers associated with 3 are my favorite, because the one I actually like the most in the world are even numbers! But to make things harder for you, you have to pick the even numbers from a range of two given numbers. Ha!
Now, let's try this one more time!
Instructions:
Input
A line containing two integers separated by a space.
5·10
Output
A line containing integers separated by a space.
6·8·10
by CodeChum Admin
Numbers in threes are awesome! But the one last time was too lengthy to look at, so I just want to view it in a shorter but still readable format.
You okay with this task?
Instructions:
Output
A line containing integers divisible by 3 separated by a space.
3·6·9·12·15·18·21·24...
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
99
by 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.
5
Output
A line containing an integer.
120
by CodeChum Admin
Instructions:
Instructions
Input
A line containing an integer.
15
Output
Multiple lines containing a string.
Fizz
Buzz
Fizz
Fizz
Buzz
Fizz
FizzBuzz
Create 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 3
Output
A line containing three integers is separated by a space.
1 3 6