0
Where is the problem
Please don't yell at me #include <iostream> using namespace std; int main() { int x = 10; cin >> x << endl; if (x != 10) { cout << "No"; goto main; } if (x == 10) { cout << "yos"; } return 0; }
4 Answers
+ 3
you can do that also this way:
#include <iostream>
using namespace std;
int main()
{
start:
int x = 10;
cin >> x;. //i have removed endl
if (x != 10) {
cout << "No";
goto start;
}
if (x == 10) {
cout << "yos";
}
return 0;
}
+ 1
I fixed it by removing "<< endl" and replacing "goto main;" with "main();".
+ 1
thank you very much
0
c++