Countdown
Read a whole number n (0 or more) and count down from n to 1, one number per line, then print Liftoff!. For the input 3:
3
2
1
Liftoff!A while loop repeats its block as long as its condition is true:
while (n > 0) {
// ...
--n; // one smaller, so the loop ends
}Results will be shown here
Press Run to start your program.