You are viewing a single comment's thread. Return to all comments →
public class Solution {
public static void main(String[] args) { Scanner scanner=new Scanner(System.in); int lineNumber=1; while (scanner.hasNextLine()){ String line=scanner.nextLine(); System.out.println(lineNumber + " " + line); lineNumber++; } scanner.close(); }
}
Seems like cookies are disabled on this browser, please enable them to open this website
An unexpected error occurred. Please try reloading the page. If problem persists, please contact support@hackerrank.com
Java End-of-file
You are viewing a single comment's thread. Return to all comments →
public class Solution {
}
**