Issue with one of the c++ questions | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Issue with one of the c++ questions

I’m having a problem with one of the questions that’s asking to create a for loop that starts at 0 and ends at 20 that output the even numbers. The problem is that when I go to input x <= 20, it implies that I need to enter a 3rd character in that 20 position. Am I doing it wrong or is the an issue.

27th May 2019, 9:10 AM
Antwon
Antwon - avatar
3 Answers
+ 5
for(int x=0; x<=20;x+=2) { printf("%d",x); } are you talking about this quiz in C++ language
27th May 2019, 9:54 AM
MsJ
MsJ - avatar
+ 3
Can you please link the code
27th May 2019, 9:19 AM
MsJ
MsJ - avatar
+ 2
~swim~ is right. I forgot about the semicolon. I was too focused on entering a number and forgot to put it there. thank you very much mohit and swim i got it now.
27th May 2019, 11:05 AM
Antwon
Antwon - avatar