CJCoding With Joseph
15free / daySign inCreate account
Back to Code Walkthrough

For Loop with Continue

C++ code walkthrough · Question 4
easyLoops

Code

Read carefully. What does this print?
1#include <iostream>
2using namespace std;
3 
4int main() {
5 for (int i = 0; i < 6; i++) {
6 if (i % 2 == 0) {
7 continue;
8 }
9 cout << i << " ";
10 }
11 cout << endl;
12 return 0;
13}

Your answer