- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjavaOperatorEx1.java
More file actions
Latest commit
22 lines (17 loc) · 692 Bytes
/
Copy pathjavaOperatorEx1.java
File metadata and controls
22 lines (17 loc) · 692 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
classjavaOperatorEx1 {
publicstaticvoidmain(String[] arg) {
// instances..
inta = 10;
intb = 5;
// Summation of two variables..
System.outprintln("Sum = "+(a+b)); // you can try - int sum = a + b...
// Substraction of two variables..
System.outprintln("Sub = "+(a-b)); // you can try - int sub = a - b...
// Multiplication of two vatiables..
System.outprintln("Mul = "+(a*b)); // you can try - int mul = a * b...
// Division of two variables..
System.outprintln("Div = "+(a/b)); // you can try - int div = a / b...
// Modulas of two variables..
System.outprintln("Mod = "+(a%b)); // you can try - int mod = a % d...
}
}