0
Whats the problem with my code? Below there isnt enogh space. I continoue here. System.out.println... After this else comes
Can somebody tell me what is the problem? import java.util.Scanner; public class Program { public static void main(String[] args) { int age, money; System.out.println("Write your age: "); Scanner ageScan = new Scanner(System.in); System.out.println("Write your money: "); Scanner moneyScan = new Scanner(System.in); age = ageScan.nextInt(); money = moneyScan.nextInt(); if (age <18 && money <500){
5 Respuestas
0
What error are you getting exactly?
0
exception in thread "main"
and it writes problems with java.utils.Scanner (unknown sources)
0
maybe the position of the vars,put each one after print
0
it isnt better in that way. :(
0
at first i have to use '||' not '&&' and on my computer this program works so i dont know what is the problem here