CJCoding With Joseph
15free / daySign inCreate account

Count Down To One

Read a starting number and use a while loop to print it, then every smaller whole number down to 1, one value per line. Input: one integer of at least 1, no prompt. The loop header is already written; fill in its body so the first line printed is the number that was read.

Expected Output:

5
4
3
2
1

= newline. The output ends with a newline — print one after the last line.

Hints2 available
Topics:
Loops
📥 Auto-Input:
5\n
This input is automatically fed to your program's stdin
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Ctrl+Space to expand shortcuts (pr, inp, def)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.