0
User input?
How do I do if I want to have 2 user inputs?
4 odpowiedzi
+ 3
You have to know that the code playground takes all inputs in the whole program at start.
+ 10
Scanner scan = new Scanner(System.in);
int a = scan.nextInt();
int x = scan.nextInt();
double b = scan.nextDouble();
This way you can take user input as many as you need. Just make sure to use the appropriate method based on the data type.
+ 1
?
- 4
hlw