+ 5
Fill in the blanks to print EVEN (multiples of 2) values from 0 to 20 using a for loop:
Under "The for Loop" lesson of the C++ Course, the following problem comes: "Fill in the blanks to print EVEN (multiples of 2) values from 0 to 20 using a for loop:" I get for (int x = 0; x <= 20; x +=2){ cout << x << endl; } And it says I am wrong for the "x <= 20" part. I don't know where I went wrong; please help.
6 Answers
+ 20
when you entered the 20.....did you enter the semi-colon just after it?
+ 3
you have to put 20;
don't forget the semicolon (;)
+ 2
oh my god i am dumb
+ 1
please add semicolon after 20. Just like 20;
0
i was missed ;
0