0

Help me in Gotham City question

In code coach there is a Gotham City question can someone help me in how to do it in C++? I did something like this: #include <iostream> using namespace std; int main() { int criminals; cin>>criminals; if(criminals<5) {cout<<"I got this!"<<endl;} if(criminals >=5; criminals <=10) {cout<<"Help me Batman"<<endl;} if(criminals> 10) {cout<<"Good luck out there!"<<endl;} return 0;

11th Jan 2021, 5:04 AM
Sampraad Das
Sampraad Das - avatar
4 odpowiedzi
+ 2
Sampraad Das 1. Change the last two "if" to "else if" 2. The second condition must be (criminals >= 5 && criminals <= 10) 3. And for the last statement: "Good Luck out there!" instead of "Good luck out there!"
11th Jan 2021, 5:13 AM
noteve
noteve - avatar
+ 1
Sampraad Das Post your attempt first to get help from the community ..
11th Jan 2021, 5:06 AM
Alphin K Sajan
Alphin K Sajan - avatar
+ 1
《 Nicko12 》 It worked thanks a lot 😊😊
11th Jan 2021, 5:23 AM
Sampraad Das
Sampraad Das - avatar
0
Alphin K Sajan I edited now check please
11th Jan 2021, 5:10 AM
Sampraad Das
Sampraad Das - avatar