CJCoding With Joseph
15per day
← Back to Question List
C++ Code Walkthrough #12

While Loop Countdown

easyLoops

📄 Code

Read carefully — what does this print?
1#include <iostream>
2using namespace std;
3 
4int main() {
5 int n = 4;
6 while (n > 0) {
7 cout << n << " ";
8 n--;
9 }
10 cout << "Go!" << endl;
11 return 0;
12}

🎯 Your Answer