CJCoding With Joseph
15free / daySign inCreate account
TitleOpen
2
Add to Float InputWrite a program that reads a float number, adds 5.5 to it, and displays the result with 2 decimal places.
easyNot startedSolve
3
Divide Double InputWrite a program that reads a double number, divides it by 3, and displays the result with 3 decimal places.
easyNot startedSolve
26
Read Single IntegerWrite a program that reads a single integer from the user using Scanner and prints it back with the message: You entered: [number] Create a Scanner object: Scanner scanner = new Scanner(System.in); and use scanner.nextInt() to read the integer.
easyNot startedSolve
27
Read Single WordWrite a program that reads a single word (string) from the user using Scanner and prints: Hello, [name]!
easyNot startedSolve
28
Read Two Integers and SumWrite a program that reads two integers from the user and displays their sum: Sum: [result] Call scanner.nextInt() twice to read both integers.
easyNot startedSolve
29
Read Double InputWrite a program that reads a double value from the user and prints it with 2 decimal places: You entered: [number] Use scanner.nextDouble() to read the double, and System.out.printf("%.2f", value) to display it with 2 decimal places.
easyNot startedSolve
30
Read Character InputWrite a program that reads a single character from the user and prints: You pressed: [character] Use scanner.next().charAt(0) to read the first character of the input.
easyNot startedSolve
35
Read Double with Printf DisplayWrite a program that reads a double from the user and displays it with exactly 4 decimal places: You entered [number] Example: If user enters 3.14, output should be: You entered 3.1400 Use scanner.nextDouble() to read input and System.out.printf() with %.4f to format the output.
easyNot startedSolve
36
Capture Word with next()Write a program that captures a single word using next() and displays: You entered [word] Example: If user enters "Bob", output should be: You entered Bob The next() method reads a single word (stops at whitespace) and automatically discards any leftover newline in the buffer.
easyNot startedSolve
38
Read Single Character InputWrite a program that captures a single character and displays: You entered [character] Example: If user enters "A", output should be: You entered A To read a single character, use sc.next().charAt(0) which reads a string and takes its first character.
easyNot startedSolve
49
Multiplication Table (while)Ask the user to enter a number, then print its multiplication table up to 10 using a while loop.
easyNot startedSolve
50
Factorial with Do-While (input)Ask the user for a number, then calculate and print its factorial using a do-while loop.
easyNot startedSolve
53
Break on Zero (while input)Keep asking for numbers in a while loop and break when the user enters 0.
easyNot startedSolve
67
Print 1..N (for input)Read an integer N and print numbers from 1 to N using a for loop.
easyNot startedSolve
124
Safe DivisionRead two integers and divide the first by the second.
easyNot startedSolve
125
Safe Integer ParseRead one line of input.
easyNot startedSolve
132
Single CSV LineRead three lines of input: name, age, and country.
easyNot startedSolve
312
Read Two Doubles and AverageRead two decimal numbers from standard input (one per line) and print their average rounded to two decimals.
easyNot startedSolve
313
Read a Long ValueRead a large whole number from standard input using sc.nextLong() and print its value multiplied by two.
easyNot startedSolve
314
Read a Boolean ValueRead a boolean value (true or false) from standard input using sc.nextBoolean() and print its logical negation.
easyNot startedSolve
315
String Length from InputRead a single word from standard input using sc.next() and print how many characters it contains.
easyNot startedSolve
316
Convert Input to UppercaseRead a single word from standard input using sc.next() and print it entirely in uppercase letters.
easyNot startedSolve
317
Square Root of InputRead a number from standard input using sc.nextDouble() and print its square root rounded to two decimals.
easyNot startedSolve
318
Weekly Pay CalculatorRead an integer number of hours worked and a decimal hourly rate from standard input (one per line) and print the total pay.
easyNot startedSolve
319
Concatenate Two WordsRead two words from standard input using sc.next() twice and print them on one line separated by a single space.
easyNot startedSolve
31
Read Full Line with nextLineWrite a program that reads a full line of text (including spaces) from the user using Scanner and prints: You said: [text] Use scanner.nextLine() to read the entire line including spaces.
mediumNot startedSolve
32
Simple Calculator InputWrite a program that reads two double numbers from the user and displays all four basic operations: Addition: [result] Subtraction: [result] Multiplication: [result] Division: [result] All results should be displayed with 2 decimal places using printf with %.2f.
mediumNot startedSolve
33
Age Calculator InputWrite a program that reads a person's name (single word) and age, then calculates and displays their age in 10 years: Hello [name], in 10 years you will be [age] years old!
mediumNot startedSolve
34
Rectangle Area InputWrite a program that reads the length and width of a rectangle as doubles and calculates the area: Area: [result] Display the area with 2 decimal places using printf with %.2f.
mediumNot startedSolve
37
Read Full Name with nextLine()Write a program that reads a full name (with spaces) using nextLine() and displays: You entered [full name] Example: If user enters "John Doe", output should be: You entered John Doe The nextLine() method reads the entire line up to and including the newline character, then discards the newline.
mediumNot startedSolve
39
Buffer Issue with nextInt and nextLineWrite a program that reads an integer, then reads a full name (with spaces).
mediumNot startedSolve
43
Mixed Input Types - Age and NameWrite a program that reads three pieces of information in order: 1.
mediumNot startedSolve
44
Temperature Input and ConversionWrite a program that reads a temperature in Celsius as a double and converts it to Fahrenheit.
mediumNot startedSolve
87
Even or Odd (Input)Read an integer and print Even if it is divisible by 2, otherwise print Odd.
mediumNot startedSolve
88
Positive, Negative, or Zero (Input)Read an integer and print Positive, Negative, or Zero using if/else if/else.
mediumNot startedSolve
89
Range Check 1..100 (Input)Read an integer and print In range if it is between 1 and 100 inclusive, otherwise print Out of range.
mediumNot startedSolve
90
Simple Withdrawal Check (Input)Account balance is 1000.
mediumNot startedSolve
91
Scholarship Eligibility (Input)Read a float GPA and an int serviceHours.
mediumNot startedSolve
137
Validate Age with ExceptionWrite a method validateAge(int age) that throws InvalidAgeException if age is less than 0 or greater than 120.
mediumNot startedSolve
138
CSV Two RowsRead two people from input.
mediumNot startedSolve
320
Sum of N NumbersFirst read an integer n, the count of numbers to follow.
mediumNot startedSolve
321
Find Maximum of ThreeRead three integers from standard input (one per line) and print the largest of the three.
mediumNot startedSolve
322
Reverse a NumberRead a positive integer n from standard input and print its digits reversed.
mediumNot startedSolve
323
Count Words in a LineRead one full line of text with sc.nextLine() and print how many words it contains.
mediumNot startedSolve
324
Leap Year Checker (Input)Read a year from standard input and print whether it is a leap year.
mediumNot startedSolve
40
Safe Integer Input with ValidationWrite a program with an inputInt() method that safely reads an integer with validation.
hardNot startedSolve
41
Input Integer in Range ValidatorCreate an inputIntRange() method that accepts a Scanner, min, and max value.
hardNot startedSolve
42
Character Option ValidatorCreate an inputCharOption() method that accepts a Scanner and a String of valid characters.
hardNot startedSolve
325
Sum Until End of InputKeep reading integers from standard input until there are no more, then print their total.
hardNot startedSolve
326
Count Vowels in a SentenceRead one full line of text with sc.nextLine() and print how many vowels (a, e, i, o, u, either case) it contains.
hardNot startedSolve