-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathArithmetic.java
More file actions
28 lines (25 loc) · 805 Bytes
/
Copy pathArithmetic.java
File metadata and controls
28 lines (25 loc) · 805 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
import java.util.Scanner;
public class Arithmetic {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
System.out.print("Enter the first Number: ");
int a = input.nextInt();
System.out.print("Enter the Second Number: ");
int b = input.nextInt();
int add = a+b;
int sub = a+b;
int mult = a+b;
float div = a+b;
float mod = a%b;
System.out.println(add);
System.out.println(sub);
System.out.println(mult);
System.out.println(div);
System.out.println(mod);
// System.out.println(a+b);
// System.out.println(a-b);
// System.out.println(a*b);
// System.out.println(a/b);
// System.out.println(a%b);
}
}