Skip to content

Commit 0aa1994

Browse files
committed
Solve task hyperskill#1
1 parent 9f657dd commit 0aa1994

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

Repl1.java

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/* Description
2+
You need to write a program that reads two numbers from the same line
3+
and prints their sum in the standard output. Numbers can be positive,
4+
negative or zero.
5+
6+
The example of work.
7+
The example below shows inputs and the corresponding outputs.
8+
Your program should work in the same way.
9+
5 8
10+
13
11+
*/
12+
13+
import java.util.Scanner;
14+
15+
class Repl1 {
16+
public static void main(String[] args) {
17+
Scanner sc = new Scanner(System.in);
18+
int a = sc.nextInt();
19+
int b = sc.nextInt();
20+
System.out.println(a + b);
21+
}
22+
}

0 commit comments

Comments
 (0)