+ 1
Cheer creator
Whats wrong? please help me solved this problem. int main() { int foul; cin >> foul; if(foul>10){ cout << "High Five"; } else if{ if(x<1) cout << "shh"; } else if{ for(int i=0; i<foul; i++) cout<< "Ra!"; }
2 Respostas
0
#include <iostream>
using namespace std;
int main()
{
int x;
cin >> x;
if(x>10)
{
cout << "High Five";
} else if(x<1)
{
cout << "shh";
} else {
for(int i=0; i<x; i++)
cout<< "Ra!";
}
}
reason for error:
1)right sytax for 'else if':
else if(condition)
2)And else was not in your code.
3)you use two names to one integer input(x,foul).
0
My bad....Thank you!! Mohan 333