public class Calculate {
int add(int num1,int num2){
return num1+num2;
}
int sub(int num1,int num2){
if(num1>num2)
return num1-num2;
else return num2-num1;
}
int multiply(int num1,int num2){
return num1*num2;
}
int divide(int num1,int num2){
return num1/num2;
}
}
import java.util.Scanner;
public class Test {
public static void main(String[] args) {
int a,b,c,d;
int num1,num2;
Calculate p1=new Calculate();
Scanner reader = new Scanner(System.in);
num1=reader.nextInt();
num2=reader.nextInt();
a=p1.add(num1, num2);
b=p1.divide(num1, num2);
c=p1.sub(num1,num2);
d=p1.multiply(num1, num2);
System.out.println("the result of add is:"+a);
System.out.println("the result of divide is:"+b);
System.out.println("the result of sub is:"+c);
System.out.println("the result of multiply is:"+d);
}
}