The plan was 1 to 9, but it should stop at 4. Show 1, 2, 3, 4 and nothing after. Leave the for line alone — do it inside the loop.
1 2 3 4
#include <iostream>
using namespace std;
int main() {
for (int n = 1; n <= 9; n++) {
cout << n << endl;
// your code here: if n is already 4, end the whole loop
}
return 0;
}
Run tries the examples. When they look right, Submit.