-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path2.1 Sum of two number.java
More file actions
36 lines (25 loc) · 913 Bytes
/
2.1 Sum of two number.java
File metadata and controls
36 lines (25 loc) · 913 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
26
27
28
29
30
31
32
33
34
35
36
/*
Jhon visited fun zone area in Elante mall. He decided to play a game which consist with some green and red color balls. He got a task to add green and red balls,then after on screen he needs to enter final sum of total number of green and red balls.
Input Format
In First line, enter total number of green color balls. In Second line, enter total number of red color balls.
Constraints
Enter only interger value.
Output Format
Display the sum of green and red color balls.
Sample Input 0
10
10
Sample Output 0
20
*/
import java.io.*;
import java.util.*;
public class Solution {
public static void main(String[] args) {
/* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. */
Scanner sc = new Scanner(System.in);
int red = sc.nextInt();
int green = sc.nextInt();
System.out.print(red+green);
}
}