|
|
@ -5,6 +5,7 @@ public class Main {
|
|
|
|
public static void main(String[] args) {
|
|
|
|
public static void main(String[] args) {
|
|
|
|
Subtraction ss=new Subtraction();
|
|
|
|
Subtraction ss=new Subtraction();
|
|
|
|
Division dd=new Division();
|
|
|
|
Division dd=new Division();
|
|
|
|
|
|
|
|
MUL mm=new MUL();
|
|
|
|
System.out.println("1-加法计算 2-减法运算");
|
|
|
|
System.out.println("1-加法计算 2-减法运算");
|
|
|
|
System.out.println("3-乘法运算 4-除法计算");
|
|
|
|
System.out.println("3-乘法运算 4-除法计算");
|
|
|
|
System.out.println("请输入选择:");
|
|
|
|
System.out.println("请输入选择:");
|
|
|
@ -17,6 +18,10 @@ public class Main {
|
|
|
|
int c=(int) ss.sub(a, b);
|
|
|
|
int c=(int) ss.sub(a, b);
|
|
|
|
System.out.println(c);
|
|
|
|
System.out.println(c);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
else if(n==3) {
|
|
|
|
|
|
|
|
int c=mm.Mul(a, b);
|
|
|
|
|
|
|
|
System.out.println(c);
|
|
|
|
|
|
|
|
}
|
|
|
|
else if(n==4) {
|
|
|
|
else if(n==4) {
|
|
|
|
int c=(int) dd.div(a, b);
|
|
|
|
int c=(int) dd.div(a, b);
|
|
|
|
System.out.println(c);
|
|
|
|
System.out.println(c);
|
|
|
|