- 1
Fill in the blanks to print EVEN (multiples of 2) values from 0 to 20 using a for loop:
Whats the answer? I put: for (int x = 0; x <= 20; x += 2) { cout << x << endl; The rest is fine, but 20 gives me wrong. What is the answer?
3 Answers
+ 4
that seems correct !
+ 2
I agree with Hima
But If the number 20 is the reason youre wrong,
Then change x <= 20 to x <= 18 although I cant be sure cause I dont know what the challenge/problem is.