write a few statements that read an integer value from standard input into this variable.

2
write a few statements that read an integer value from standard input into this variable.

LANGUAGE: JAVA

CHALLENGE:

Given an int variable datum that has already been declared, write a few statements that read an integer value from standard input into this variable.

SOLUTION:


Scanner input = new Scanner(System.in);
datum = input.nextInt();

2 comments

Add comment