0

Hey guys , why my code is not working in 3rd condition

Cheer creator question #include <iostream> using namespace std; int main() { int x; cin>>x; if(x>10){ cout<<"High five"<<endl; }else if(x<1){ cout<<"shh"<<endl; }else for(int i=0;i<x;i++){ cout<<"Ra!"; } return 0; }

23rd Oct 2020, 9:08 AM
gouravcc 1
gouravcc 1 - avatar
5 Antworten
+ 1
Alphin K Sajan and Bhavya Sarraf thanks But changing "five" To "Five" Works
23rd Oct 2020, 10:29 AM
gouravcc 1
gouravcc 1 - avatar
+ 5
Your 3rd condition shoud be like: else { for(int i=0;i<x;++i) cout<<"Ra!"; }
23rd Oct 2020, 9:13 AM
Alphin K Sajan
Alphin K Sajan - avatar
+ 1
gouravcc 1 your code is correct, just change the word 'five' to 'Five'.
23rd Oct 2020, 9:27 AM
QTWizard
+ 1
Thanks QTWizard it works 🙏🙏
23rd Oct 2020, 10:27 AM
gouravcc 1
gouravcc 1 - avatar