import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { static String s; static int a=1; // For loop public static void main(String[] args) { Scanner scan = new Scanner(System.in); for(int i = 1; scan.hasNext()== true; i++){ System.out.println(i + " " + scan.nextLine()); } } }
Java program to read N lines of input until you reach EOF.
Reviewed by
on
December 22, 2019
Rating:
No comments: