CJCoding With Joseph
15free / daySign inCreate account
TitleOpen
45
For Loop 1 to 10Write a program that prints the numbers from 1 to 10 using a for loop.
easyNot startedSolve
46
While Loop 10 to 1Write a program that prints the numbers from 10 down to 1 using a while loop.
easyNot startedSolve
47
Do-While 1 to 5Write a program that prints the numbers from 1 to 5 using a do-while loop.
easyNot startedSolve
48
Sum 1 to 100 (for)Write a program that calculates the sum of numbers from 1 to 100 using a for loop and prints: The sum of numbers from 1 to 100 is: 5050
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
51
Skip Number 5 (continue)Print numbers from 1 to 10 using a for loop, skipping 5 with continue.
easyNot startedSolve
52
Odd Numbers 1 to 10 (continue)Print only odd numbers from 1 to 10 using a for loop and continue.
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
54
Even Numbers 2 to 20 (for)Print even numbers from 2 to 20 using a for loop.
easyNot startedSolve
55
Odd Numbers 1 to 19 (for)Print odd numbers from 1 to 19 using a for loop.
easyNot startedSolve
56
Squares 1 to 5 (for)Print the squares of numbers from 1 to 5 using a for loop.
easyNot startedSolve
57
Sum 1 to 50 (for)Compute the sum of numbers from 1 to 50 using a for loop and print 'Sum: 1275'.
easyNot startedSolve
58
Multiplication Table of 4 (for)Print the multiplication table of 4 from 1 to 10 using a for loop.
easyNot startedSolve
59
Repeat Star 5 Times (for)Print five '' characters on one line using a for loop.
easyNot startedSolve
60
Array Elements (for-each)Given an int array {2, 4, 6, 8}, print elements using a for-each loop on one line.
easyNot startedSolve
61
Skip Multiples of 3 (continue)Print numbers 1 to 10 but skip multiples of 3 using continue.
easyNot startedSolve
62
Break at 5 (for)Print numbers starting at 0 using a for loop and break when i equals 5.
easyNot startedSolve
63
Countdown 5 to 0 (for)Use a for loop to count down from 5 to 0.
easyNot startedSolve
65
Sum of Evens 1..10 (for)Compute the sum of even numbers from 1 to 10 using a for loop and print 'Sum of evens: 30'.
easyNot startedSolve
66
Factorial of 5 (for)Calculate the factorial of 5 using a for loop.
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
68
Multiples of 5 up to 50 (for)Print multiples of 5 up to 50 using a for loop.
easyNot startedSolve
145
Count Zeros in an ArrayRead an integer n, then read n integers.
easyNot startedSolve
288
Print Alphabet a to z (for)Use a for loop to print the lowercase alphabet from a to z all on one line, then print a newline.
easyNot startedSolve
289
Sum of First N Numbers (input)Read a single integer n from standard input, then use a loop to add up the numbers from 1 to n.
easyNot startedSolve
290
Count Digits in a Number (while)The variable n holds the value 4587.
easyNot startedSolve
291
Average of Array Elements (for-each)The array nums contains {10, 20, 30, 40}.
easyNot startedSolve
292
Maximum in Array (for)The array nums contains {3, 9, 2, 7, 5}.
easyNot startedSolve
293
Minimum in Array (for)The array nums contains {8, 3, 6, 1, 9}.
easyNot startedSolve
294
Print Characters of a Word (for)The variable word holds the text code.
easyNot startedSolve
295
Repeat a Word 3 Times (for)Use a for loop that runs exactly 3 times to print the word Java on its own line each time.
easyNot startedSolve
296
Multiples of 7 up to 70 (for)Use a for loop to print every multiple of 7 from 7 up to and including 70, each on its own line.
easyNot startedSolve
297
Sum of Squares 1 to 5 (for)Use a for loop to add up the squares of the numbers 1 through 5 (that is 1 + 4 + 9 + 16 + 25) and print the output shown in Expected Output.
easyNot startedSolve
298
Product of Array Elements (for-each)The array nums contains {1, 2, 3, 4}.
easyNot startedSolve
299
Count Even Numbers in Array (for)The array nums contains {4, 7, 10, 3, 8, 5}.
easyNot startedSolve
64
3x5 Stars (nested for)Use nested for loops to print 3 rows of 5 '' characters.
mediumNot startedSolve
147
Longest Word LengthRead an integer n, then read n words.
mediumNot startedSolve
300
Sum of Digits (while)The variable n holds 1234.
mediumNot startedSolve
301
Reverse a Number (while)The variable n holds 1234.
mediumNot startedSolve
302
Fibonacci First 10 (for)Use a for loop to print the first 10 Fibonacci numbers, each on its own line.
mediumNot startedSolve
303
Count Vowels in a String (for)The variable s holds the word education.
mediumNot startedSolve
304
FizzBuzz 1 to 15 (for)Use a for loop over the numbers 1 to 15.
mediumNot startedSolve
305
Reverse a String (for)The variable s holds the word hello.
mediumNot startedSolve
306
Right Triangle of Stars (nested for)Use nested for loops to print a right triangle of characters with 5 rows, where row i has i stars.
mediumNot startedSolve
307
Power Using a Loop (for)Compute 2 raised to the power 8 using a for loop (multiply 1 by 2 a total of 8 times) and print the result in the exact format shown in Expected Output.
mediumNot startedSolve
308
Check Prime Number (for input)Read an integer n from standard input and decide whether it is prime.
hardNot startedSolve
309
GCD with While LoopCompute the greatest common divisor (GCD) of 48 and 36 using the Euclidean algorithm in a while loop, then print the output shown in Expected Output.
hardNot startedSolve
310
Number Pyramid (nested for)Use nested for loops to print 5 rows where row i prints the numbers 1 through i with no spaces.
hardNot startedSolve
311
Collatz Steps (while)Starting from n = 6, count how many steps it takes to reach 1 using the Collatz rule: if n is even, halve it; if n is odd, replace it with 3 n + 1.
hardNot startedSolve