Cheer creator | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 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!"; }

20th Oct 2020, 4:19 PM
Jeremy
Jeremy - avatar
2 Answers
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).
20th Oct 2020, 4:27 PM
˜”*°•.˜”*°• Mohan 333 •°*”˜.•°*”˜
˜”*°•.˜”*°• Mohan 333 •°*”˜.•°*”˜ - avatar
0
My bad....Thank you!! Mohan 333
20th Oct 2020, 4:29 PM
Jeremy
Jeremy - avatar