Skip to content

Commit 652ee20

Browse files
authored
Java Program - Sum of two Numbers
1 parent 74d6d8b commit 652ee20

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

Test5_Sum_of_2Number.java

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
package com.test.Basic_Java_Programs;
2+
3+
import java.util.Scanner;
4+
5+
public class Test5_Sum_of_2Number
6+
{
7+
public static void main(String[] args)
8+
{
9+
int x, y, sum;
10+
11+
System.out.println("Enter two Numbers");
12+
13+
Scanner sc = new Scanner(System.in);
14+
15+
x = sc.nextInt();
16+
y = sc.nextInt();
17+
18+
sum = x + y;
19+
20+
System.out.println("Addition of two Number is " + sum);
21+
}
22+
23+
}
24+
25+
//Output
26+
/*
27+
28+
Enter two Numbers
29+
10
30+
20
31+
Addition of two Number is 30
32+
33+
34+
*
35+
*/

0 commit comments

Comments
 (0)