3rd Mar 2020, 7:06 PM
Icebreaker
Icebreaker - avatar
4 ответов
+ 4
It's always good to review some lessons https://www.sololearn.com/learn/Java/2143/?ref=app Also you are missing some { } brackets. Using a proper indentation in your code will help you find them
3rd Mar 2020, 7:18 PM
Kevin ★
+ 1
1. = inside if condition must be == 2. =< does’t exists. It shoud be <= 3. You missed { after else if condition 4. You missed } at the end Hope this helps.
3rd Mar 2020, 7:45 PM
Gabriel Ilie
Gabriel Ilie - avatar
+ 1
public class Program { public static void main(String[] args) { int age = 12; boolean IDcard = false; if (IDcard == true && age >= 18) { System.out.println("You can go in area A"); } else if (IDcard == false && age <= 13) { System.out.println("You can go in area B"); } else { System.out.println("You can go in area C"); } } }
4th Mar 2020, 5:07 AM
ROBIN C R
ROBIN C R - avatar
0
Thanks guys
5th Mar 2020, 2:40 PM
Icebreaker
Icebreaker - avatar