-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path6.2 Total_Order_SumProblem.java
43 lines (32 loc) · 1.04 KB
/
6.2 Total_Order_SumProblem.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
/*
Consider that two friends Neha and Nisha are going for shopping .Neha has picked the N number of Items from the Market and Nisha has picked X number of Items from the Market .Find out total numbers of Items ordered by both .
Input Format
In First input line, you should enter number of Items ordered by Neha.
In Second input line, you should enter number of Items ordered by Nisha.
Constraints
Enter only integer (positive) value.
0<=n<=100
Output Format
Total numbers of items ordered by Neha and Nisha during shopping.
Sample Input 0
5
10
Sample Output 0
15
*/
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);
//Neha's Order
int N = sc.nextInt();
//Nisha's Order
int X = sc.nextInt();
//Total Order
int Total = N+X;
//Result
System.out.print(Total);
}
}