CJCoding With Joseph
15free / daySign inCreate account

Rocket Countdown

Use a while loop to count down from 5 to 1, printing each number on its own line, and then print the word Liftoff! on the final line. Start a variable at 5, keep looping while it is at least 1, print it, and decrease it by one each time. Be sure to print Liftoff! only once, after the countdown loop has ended.

Expected Output:

5
4
3
2
1
Liftoff!

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

Hints4 available
Topics:
Loops
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (cw, cr, fori)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.