-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path5 Arithmetic.java
More file actions
33 lines (21 loc) · 928 Bytes
/
Copy path5 Arithmetic.java
File metadata and controls
33 lines (21 loc) · 928 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
import java.util.Scanner;
public class Arithmetic {
public static void main(String[] args) {
Scanner input =new Scanner(System.in);
System.out.println("Welcome to Arithmatic calculator\n ");
System.out.println(" Please enter first number ");
int fisrt = input.nextInt();
System.out.println(" Now enter Second number ");
int Second = input.nextInt();
int add = fisrt + Second;
int sub = fisrt - Second;
int mul = fisrt * Second;
int div = fisrt / Second;
int mod= fisrt % Second;
System.out.println(" Addition is: "+ add );
System.out.println(" Subtraction is: "+ add );
System.out.println(" Multiplication is: "+ add );
System.out.println(" Division is: "+ add );
System.out.println(" Modulus is: "+ add );
}
}