Skip to content

Commit 72b0dc3

Browse files
End_of_file_solution.java
Solution of a string problem
1 parent 4ea7ace commit 72b0dc3

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import java.io.*;
2+
import java.util.*;
3+
import java.text.*;
4+
import java.math.*;
5+
import java.util.regex.*;
6+
7+
public class End_of_file_solution {
8+
9+
public static void main(String[] args) {
10+
Scanner sc=new Scanner(System.in);
11+
int i = 0;
12+
while (sc.hasNextLine()) {
13+
System.out.printf("%d %s\n",++i,sc.nextLine());
14+
}
15+
}
16+
}

0 commit comments

Comments
 (0)