/* Arithmetic Operation Using Java */
class ArithOp {
public static void main(String args[]) {
int num1,num2,Add,Mul,Div,Sub;
num1 = 200;
num2 = 100;
System.out.println(" This is num1: "+num+" and num2: "+num2);
Add = num1 + num2;
Mul = num1 * num2;
Div = num1 / num2;
Sub = num1 - num2;
System.out.println("Addition =" +Add);
System.out.println("Multiplication =" +Mul);
System.out.println("Division =" +Div);
System.out.println("Subtraction =" +Sub);
}
}
Output:
This is num1: 200 and num2: 100
Addition = 300
Multiplication = 200
Division = 2
Subtraction = 100
0 comments:
Post a Comment