-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMultiCal.java
More file actions
40 lines (29 loc) · 982 Bytes
/
MultiCal.java
File metadata and controls
40 lines (29 loc) · 982 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
package com.company;
import java.util.Scanner;
public class MultiCal {
public static void main(String[] args) {
Scanner sc = new Scanner (System.in);
System.out.println("Enter First Number");
int x =sc.nextInt();
System.out.println("");
System.out.println("Enter Second Number");
int y = sc.nextInt();
System.out.println("");
System.out.println("Your Sum Is");
int sum = x + y;
System.out.println(sum);
System.out.println("");
System.out.println("Your Multiplication Is");
int mul = x * y;
System.out.println(mul);
System.out.println("");
System.out.println("Your Division Is");
double div = (double) x / (double) y;
System.out.println(div);
System.out.println("");
System.out.println("Your Subtraction Is");
int sub = x - y;
System.out.println(sub);
System.out.println("");
}
}