+ 4

Help! Where is it wrong?

You are a police officer, and you get a report of criminal activity! Should you go on your own, or should you call a superhero to help you fight the crime? If there are less than 5, you can handle this on your own, if there are 5-10, you will want to go with Batman for backup, and if there are more than 10, you should stay where it is safe and let Batman handle this on his own! Task: Determine whether you need to call backup based on the total number of criminals being reported. Input Format: An integer that represents the total number of criminals present at the scene. Output Format: A string that says 'I got this!', 'Help me Batman', or 'Good Luck out there!' depending on the scenario. My code include <stdio.h> int main() { int cr; scanf("%d",&cr); if (cr<5){ printf("I got this!"); } else if(cr>=5 && cr<=10){ printf("Help me Batman"); } else{ printf("Goodluck out there!"); } return 0; }

19th Jun 2024, 2:35 PM
〔Ether〕
〔Ether〕 - avatar
2 Answers
+ 9
last printf: Good Luck out there!
19th Jun 2024, 2:41 PM
「HAPPY TO HELP」
「HAPPY TO HELP」 - avatar
+ 5
Thanks mate! That was so stupid of me T-T 「H A P P Y T O H E L P」
19th Jun 2024, 5:44 PM
〔Ether〕
〔Ether〕 - avatar