Hackerrank – Java Solution – Java Stdin and Stdout II

Hackerrank - Java Solutions Hackerrank Online Judge Solution

Hackerrank – Java Solution – Java Stdin and Stdout II

HackerRank Problem Solution

Problem Name – Java Stdin and Stdout II
Problem Link –  https://www.hackerrank.com/challenges/java-stdin-stdout/problem
Level – Introduction Challenges

Java Code

import java.util.Scanner;

public class Solution {
public static void main(String[] args) {
/* Read input */
Scanner scan = new Scanner(System.in);
int i = scan.nextInt();
double d = scan.nextDouble();
scan.nextLine(); // gets rid of the pesky newline
String s = scan.nextLine();
scan.close();

/* Print output */
System.out.println("String: " + s);
System.out.println("Double: " + d);
System.out.println("Int: " + i);
}
}

Tags: HackerRank Online Judge Solution, HackerRank OJ Solution list, HackerRank Problems Solution, HackerRank solver, HackerRank all problem solution list, HackerRank solution in java, Hackerrank Java Solution, Hackerrank – Java Solution – Java Stdin and Stdout II

Leave a Reply

Your email address will not be published.