0

What's the wrong in my last code?

25th Feb 2017, 4:43 PM
Noor Bzour
Noor Bzour - avatar
2 Answers
+ 7
In line 27 and 30 '{' should be after for(;;;){.....} not before for loop.. Just replace this.... for(x=0;x>=6;x++){ cout<<" you lost"<<endl;} for(x=0;x<6;x++){ cout<<"you win"<<endl; cout<<"your score is 10"<<endl;} to your code.. P.s: I don't know what your game really is...
25th Feb 2017, 4:50 PM
Mr.Robot
Mr.Robot - avatar
+ 1
the problem is in the for loop. a for loop syntax should look like for ( d=1;d <12;d++); your program is expecting 2 semicolons between the for loop brackets.
25th Feb 2017, 4:56 PM
Jason Hoffman
Jason Hoffman - avatar