+ 1
"}" isn't recognized????!
I was doing some exercises but i came across a strange thing! My code : #include <iostream> using namespace std; int main() { int y; int x=0; for(x; x=0&&x<10; x++;) { cout<<"Put any value other than 5!"<<endl; cin>>y; if(y==5) { x=11; cout<<"Hey!, you weren't supposed to type 5!"<<endl; } if(x==9&&y!=5) { cout<<"Wow, you're more patient then I am, you win."<<endl; } } return 0; } The last } can't be recognised so intmain() isn't "closed" but why!?
6 Respostas
+ 1
yup @ace got it right
+ 1
oh really?? Thanks guys ! I will test it just to confirn it!
+ 1
Yep confirmed!
+ 1
Have a nice day
Happy coding
0
Happy coding to you too!