Apply your loop skills to build a countdown system. The program should take a starting number and count down to zero, printing each value along the way.
YOUR TASK
Create a program that:
Asks the user for a starting number
Counts down from that number to 0 using a loop
Prints each number on its own line
Prints Go! when it reaches 0
Need a hint?
Step-by-step:
1. Read the number: int n = int.Parse(Console.ReadLine());
2. Use a while loop: while (n > 0) { Console.WriteLine(n); n--; }
3. After the loop: Console.WriteLine("Go!");
Example (input: 5):
Enter number: 5
5 4 3 2 1 Go!
Code Editor Ready
Output
Console
Console initialized...
Ready for Project 3: Countdown Timer
> Test your code with the "Check My Code" button
> When it passes, the Complete button will activate!