-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDay63(2).java
60 lines (42 loc) · 846 Bytes
/
Day63(2).java
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
Task
****
Read 3 integers from stdin and then print them to stdout. Each integer must be printed on a new line.
Scanner class
************
Scanner scanner = new Scanner(System.in);
String myString = scanner.next();
int myInt = scanner.nextInt();
scanner.close();
System.out.println("myString is: " + myString);
System.out.println("myInt is: " + myInt);
Input
*****
Hi 5
Output
******
myString is: Hi
myInt is: 5
Program
*******
public class Solution {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int i1= scan.nextInt();
int i2= scan.nextInt();
int i3= scan.nextInt();
scan.close();
System.out.println(i1);
System.out.println(i2);
System.out.println(i3);
}
}
Input
*****
42
100
125
Output
******
42
100
125