CJCoding With Joseph
15free / daySign inCreate account
โ† 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