+ 1

Gotham City( test case 3 and 4 failed )

Most of my solutions failed in test case 3& 4 Can anyone help me with that My Code : #include <iostream> using namespace std; int main() { int a; cin>> a; if(a<5 && a>=0){ cout<<"I got this!"; } else if (a>=5 && a<=10){ cout<<"Help me Batman"; } else cout<<"Good luck out there"; return 0; }

20th Sep 2020, 6:15 PM
Mantu kumar
Mantu kumar - avatar
4 Antworten
+ 2
Last case should be: 'Good Luck out there!' Upper Case "L" in Luck and a "!" at the end.
20th Sep 2020, 6:28 PM
Coding Cat
Coding Cat - avatar
+ 2
I have answer, but in Python 🙁
20th Sep 2020, 6:26 PM
Emily Swans
Emily Swans - avatar
+ 1
Thomas LoL , I am blind Thanks 😊
20th Sep 2020, 6:34 PM
Mantu kumar
Mantu kumar - avatar
0
Your welcome. And by the way, your return statement is not the best. The caller will only get the return 0 for the last case. Maybe it would better to put a return 0 after each case. But this is not "my" languages.
20th Sep 2020, 6:40 PM
Coding Cat
Coding Cat - avatar