+ 1
Find errors in code
2 Respostas
+ 3
public class Program {
public static void main(String[] args) {
int age = 22;
int money = 800;
if (age >= 18 && money > 500) {
System.out.println("Welcome!");
}
else if (age < 18) {
System.out.println ("thanks");
}
}
}
You can also take into account when age takes the value 18; thats why i added the age >= 18
Maybe you should read lesson 14.1 of the Java course (logical operators)
Hope it helps
+ 1
Gonzalo da Cruz yes good explanation thanks))