Java Stdin and Stdout I solution

Problem discussion

          Here we will discuss and solve Hackerrank Java practice problem Java Stdin and Stdout I.

          If you have read Java Stdin and Stdout I problem carefully then you know what to do in this problem. This is just a basic Java input-output practice program where said to take three input of integer number and print them. You must print each output in a new line. There are a sample input and output to better understand. 

Sample input:

42
100
125

Sample output:

42
100
125

          Here we just need to write a Java program that can read three integer number and display them. If you feel, you don’t know how to take input in Java then read I/O operation of Java. If you have done, try to solve this HackerRank problem. Don’t worry if you failed to solve the problem then you can get help from the below code. 

Source code

Before seeing the source code ensure that you have tried hard most!!! 
import java.util.Scanner;

public class Solution
{
    public static void main(String[] args)
    {
        Scanner scan = new Scanner(System.in);
        int a = scan.nextInt();
        int b = scan.nextInt();
        int c = scan.nextInt();

        System.out.println(a);
        System.out.println(b);
        System.out.println(c);
    }
}

Be with us, stay happy. Please do your precious comment and give an opportunity to improve us.
Happy coding.

Leave a comment

Website Powered by WordPress.com.

Up ↑

Design a site like this with WordPress.com
Get started