0

What's wrong with my code?

Can someone explain me what's wrong with my code, when I try to run at the codecoach's compiler my 3rd and 4th cases are failed but I don't know how? Here is the code : import java.util.Scanner; public class Program { public static void main(String[] args) { Scanner input = new Scanner(System.in); int criminals = input.nextInt(); if (criminals < 5) { System.out.println("I got this!"); } else if (criminals >= 5 && criminals <= 10) { System.out.println("Help me Batman"); } else if (criminals > 10){ System.out.println("Good luck out there"); } } }

17th Jul 2020, 10:13 AM
Kovács Levente
4 Antworten
+ 2
Check what the description says about output : Good Luck out there!
17th Jul 2020, 10:45 AM
Daljeet Singh
Daljeet Singh - avatar
0
Yeah, I know but when I check it in the codecoach 'compiler', it didn't work
17th Jul 2020, 10:32 AM
Kovács Levente
0
Probably yes, or I don't know because I can't see the 3rd and 4th cases :(
17th Jul 2020, 10:35 AM
Kovács Levente
0
Thank you very much!
17th Jul 2020, 10:47 AM
Kovács Levente