2nd Nov 2019, 3:37 PM
Filip Nguyen
Filip Nguyen - avatar
3 ответов
+ 6
Scanner sc = new Scanner(System.in); int thot = sc.nextInt(); Make the above change and you are good to go. Also your first and last conditions are same so change it.
2nd Nov 2019, 3:49 PM
Avinesh
Avinesh - avatar
+ 5
It's because you are trying to compare an integer to a Scanner object. You can fix it easily: int thot_age = thot.nextInt(); and use that variable for comparison. Also, you might want to check your conditions, because there are things
2nd Nov 2019, 3:49 PM
Airree
Airree - avatar
+ 3
Thx, it works now. I am new to java, just trying to have fun with learning.
2nd Nov 2019, 3:56 PM
Filip Nguyen
Filip Nguyen - avatar