+ 3
How to get users data in java
like if I want 2 numbers from them
2 Respuestas
+ 2
https://code.sololearn.com/cq3Sdc0Q8Q6x/#java
import java.util.Scanner;
public class Program
{
public static void main(String[] args) {
Scanner scnr = new Scanner(System.in);
int firstNum = 0;
int secNum = 0;
System.out.println("First user input: ");
firstNum = scnr.nextInt();
System.out.println("Second user input: ");
secNum = scnr.nextInt();
System.out.println("User entered " + firstNum + " and " + secNum + ".");
}
}
::: OUTPUT ::::
First user input:
Second user input:
User entered 4 and 20.
+ 1
thnx