CJCoding With Joseph
15free / daySign inCreate account
TitleOpen
24
For Loop 1 to 10Use a for loop to print the numbers from 1 to 10 on one line, separated by single spaces.
easyNot startedSolve
25
While Loop 10 Down to 1Use a while loop to print the numbers from 10 down to 1 on one line, separated by single spaces.
easyNot startedSolve
26
Do-While 1 to 5Use a do-while loop to print the numbers from 1 to 5 on one line, separated by single spaces.
easyNot startedSolve
27
Print Five StarsUse a for loop to print exactly five '' characters on one line.
easyNot startedSolve
28
Even Numbers 2 to 20Use a for loop to print the even numbers from 2 to 20 on one line, separated by single spaces.
easyNot startedSolve
29
Odd Numbers 1 to 19Use a for loop to print the odd numbers from 1 to 19 on one line, separated by single spaces.
easyNot startedSolve
30
Countdown 5 to 0Use a for loop to count down from 5 to 0 on one line, separated by single spaces.
easyNot startedSolve
31
Multiples of 5 up to 50Use a for loop to print the multiples of 5 from 5 up to 50 on one line, separated by single spaces.
easyNot startedSolve
32
Squares 1 to 5Use a for loop to print the squares of the numbers 1 to 5 on one line, separated by single spaces.
easyNot startedSolve
33
Sum 1 to 100Use a for loop to add up all the numbers from 1 to 100, then print the total in the exact format shown in Expected Output.
easyNot startedSolve
34
Sum of Evens 1 to 10Use a for loop to add up only the even numbers from 1 to 10, then print the total in the exact format shown in Expected Output.
easyNot startedSolve
35
Factorial of 5Use a for loop to calculate the factorial of 5 (5 x 4 x 3 x 2 x 1), then print it in the exact format shown in Expected Output.
easyNot startedSolve
36
Multiplication Table of 4Use a for loop to print the multiplication table of 4, from 1 to 10.
easyNot startedSolve
37
Print 1 to NRead an integer N, then use a for loop to print the numbers from 1 to N on one line, separated by single spaces.
easyNot startedSolve
38
Sum 1 to NRead an integer N, then use a for loop to add up all the numbers from 1 to N.
easyNot startedSolve
196
Count From 1 to 10Write a program that prints the whole numbers from 1 up to 10, one number per line.
easyNot startedSolve
197
Add Up 1 Through 100Write a program that adds together every integer from 1 to 100 and prints the final total.
easyNot startedSolve
198
The Six Times TableWrite a program that prints the 6 times table from 6 x 1 up to 6 x 10.
easyNot startedSolve
199
Countdown From 10Write a program that counts down from 10 to 1, printing each number on its own line.
easyNot startedSolve
200
Sum of Even Numbers to 20Write a program that adds up the even numbers 2, 4, 6, and so on up to and including 20, then prints the total.
easyNot startedSolve
201
Squares of 1 Through 5Write a program that prints the square of each number from 1 to 5, one result per line.
easyNot startedSolve
202
Multiples of Three Up to 15Write a program that prints the multiples of 3 starting at 3 and going up to 15, one per line, so the output is 3, 6, 9, 12, 15.
easyNot startedSolve
271
Sum of Odd Numbers 1 to 9Use a loop to add the odd numbers 1, 3, 5, 7, and 9, then print their sum with no trailing newline (see Expected Output).
easyNot startedSolve
272
Multiples of 3 up to 30Print every multiple of 3 from 3 up to and including 30, one number per line (see Expected Output).
easyNot startedSolve
273
Cubes 1 to 5Print the cubes of the numbers 1 through 5 (each is i i i), one per line (see Expected Output).
easyNot startedSolve
274
Print Letters A to ELoop over the uppercase letters from A to E and print them on a single line with no spaces and no trailing newline (see Expected Output).
easyNot startedSolve
275
Countdown by TwosCount down from 10 to 0, stepping by 2, printing each number on its own line (see Expected Output).
easyNot startedSolve
276
Even Numbers in ReversePrint the even numbers from 20 down to 2 in descending order, one per line (see Expected Output).
easyNot startedSolve
277
ASCII Codes of A to EFor each uppercase letter from A to E, print its ASCII code on its own line (see Expected Output).
easyNot startedSolve
278
Repeat a Word Three TimesPrint the word Hello three times, each on its own line, using a loop (see Expected Output).
easyNot startedSolve
279
Multiples of 7 up to 70Print every multiple of 7 from 7 up to and including 70, one per line (see Expected Output).
easyNot startedSolve
280
Print N HashesRead an integer n from standard input, then print exactly n # characters on one line with no trailing newline.
easyNot startedSolve
281
Sum 1 to 50Use a loop to add every integer from 1 to 50, then print the total with no trailing newline (see Expected Output).
easyNot startedSolve
282
Powers of Two up to 128Starting from 1, repeatedly double the value and print each result up to 128, one per line (see Expected Output).
easyNot startedSolve
283
Skip the Number 3Loop from 1 to 6 and print each number on its own line, but SKIP the number 3 using continue (see Expected Output).
easyNot startedSolve
39
Multiplication Table of NRead an integer N, then print its multiplication table from 1 to 10.
mediumNot startedSolve
40
Factorial of NRead an integer N (assume N is at least 1), then use a loop to compute N!
mediumNot startedSolve
41
Count the DigitsRead a positive integer N, then use a while loop to count how many digits it has.
mediumNot startedSolve
42
Sum of DigitsRead a positive integer N, then use a while loop to add up its digits.
mediumNot startedSolve
43
Power with a LoopRead two integers, a base and an exponent (both on the input, base first).
mediumNot startedSolve
44
Right Triangle of StarsRead an integer N, then use nested loops to print a right triangle of stars with N rows.
mediumNot startedSolve
45
Count Even and Odd in a RangeRead an integer N, then loop from 1 to N counting how many numbers are even and how many are odd.
mediumNot startedSolve
203
Five by Five Multiplication GridWrite a program that prints a 5 by 5 multiplication grid.
mediumNot startedSolve
204
Right Triangle of Stars (Practice)Write a program that prints a right triangle made of asterisks with 5 rows.
mediumNot startedSolve
205
First Ten Fibonacci NumbersWrite a program that prints the first 10 numbers of the Fibonacci sequence on a single line, separated by single spaces.
mediumNot startedSolve
284
FizzBuzz 1 to 15Print the numbers 1 through 15, one per line, with a twist: for multiples of 3 print Fizz, for multiples of 5 print Buzz, and for multiples of both print FizzBuzz.
mediumNot startedSolve
285
Reverse a NumberRead a positive integer n from standard input and print its digits reversed, with no trailing newline.
mediumNot startedSolve
286
Sum of Squares 1 to NRead an integer n from standard input and print the sum of the squares 11 + 22 + ...
mediumNot startedSolve
287
Largest Digit in a NumberRead a positive integer n from standard input and print its largest digit, with no trailing newline.
mediumNot startedSolve
288
Inverted Right Triangle of StarsRead an integer n from standard input and print an inverted right triangle of .
mediumNot startedSolve
289
Sum of First N Odd NumbersRead an integer n from standard input and print the sum of the first n odd numbers (1 + 3 + 5 + ...), with no trailing newline.
mediumNot startedSolve
290
Count Multiples of 3 in a RangeRead two integers a and b (with a <= b) from standard input and print how many numbers in the range a to b (inclusive) are divisible by 3, with no trailing newline.
mediumNot startedSolve
291
Alternating Sum 1 to NRead an integer n from standard input and print the alternating sum 1 - 2 + 3 - 4 + ...
mediumNot startedSolve
292
Number TriangleRead an integer n from standard input and print a number triangle: row i contains the digits 1 through i with no spaces.
mediumNot startedSolve
46
Fibonacci First N TermsRead an integer N (N >= 1), then print the first N terms of the Fibonacci sequence on one line, separated by single spaces.
hardNot startedSolve
47
Print Primes up to NRead an integer N, then print every prime number from 2 up to and including N, on one line separated by single spaces.
hardNot startedSolve
48
Multiplication GridRead an integer N, then print an N x N multiplication grid.
hardNot startedSolve
293
GCD of Two NumbersRead two positive integers a and b from standard input and print their greatest common divisor (GCD), with no trailing newline.
hardNot startedSolve
294
Collatz StepsRead a positive integer n from standard input and print 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
295
Digital RootRead a positive integer n from standard input and print its digital root: repeatedly replace n with the sum of its digits until a single digit remains.
hardNot startedSolve