HackerRank Java- Stdin and Stdout I

In this challenge, you must read 3 integers from stdin and then print them to stdout. Each integer must be printed on a new line. To make the problem a little easier, a portion of the code is provided for you in the editor below.

  1. import java.util.*;
  2. public class Solution {
  3. public static void main(String[] args) {
  4. Scanner scan = new Scanner(System.in);
  5. int a = scan.nextInt();
  6. // Complete this line
  7. // Complete this line
  8. int b = scan.nextInt();
  9. int c = scan.nextInt();
  10. System.out.println(a);
  11. // Complete this line
  12. // Complete this line
  13. System.out.println(b);
  14. System.out.println(c);
  15. }
  16. }


Codesadda.com is your home of programming solutions, tutorials, video tutorials and much more. Sign Up for our weekly newsletter to get update about new content.

Like us on Facebook | Connect with us on LinkedIn | Subscribe our Channel on Youtube