Reading integer numbers

Report a typo

Write a program that reads four integer numbers from one line and prints them each in a new line. In the input line, numbers are separated by one or more spaces.

Sample Input 1:

101    102 103  104

Sample Output 1:

101
102
103
104
Write a program in Java 17
import java.util.Scanner;

class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
// start coding here
}
}
___

Create a free account to access the full topic