- Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathjava-stdin-stdout.java
More file actions
Latest commit
25 lines (20 loc) · 706 Bytes
/
Copy pathjava-stdin-stdout.java
File metadata and controls
25 lines (20 loc) · 706 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Java > Introduction > Java Stdin and Stdout II
// Familiarize yourself with Standard Input/Output.
//
// https://www.hackerrank.com/challenges/java-stdin-stdout/problem
// challenge id: 9458
//
importjava.util.Scanner;
publicclassSolution {
publicstaticvoidmain(String[] args) {
Scannerscan = newScanner(System.in);
inti = scan.nextInt();
// Write your code here.
doubled = scan.nextDouble();
scan.nextLine(); // lit le retour à la ligne après le double
Strings = scan.nextLine();
System.out.println("String: " + s);
System.out.println("Double: " + d);
System.out.println("Int: " + i);
}
}