-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDay-02-Java-Q7
More file actions
42 lines (30 loc) · 894 Bytes
/
Day-02-Java-Q7
File metadata and controls
42 lines (30 loc) · 894 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
37
38
39
40
41
42
/*sila wants to know how the Arithmetic operators are performing in programming.could you please help her to learn the Arithmetic calculation.
Input Format
First input consist of integer
second input consist of integer
Constraints
No Constraints
Output Format
execute the Arithmetic calculation values.
Sample Input 0
45
7
Sample Output 0
Addition=52
Subtraction=38
Multiplication=315
Division=6
Modulo=3
*/
#Answer
import java.io.*;
import java.util.*;
public class Solution {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
System.out.printf("Addition=%d\nSubtraction=%d\nMultiplication=%d\nDivision=%d\nModulo=%d", a+b, a-b, a*b, a/b, a%b);
/* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. */
}
}