package calculator; import java.util.Scanner; public class main { public static void main(String[] args) { // TODO Auto-generated method stub System.out.println("选择计算类型\n1、e~x\n2、logax\n3、+-×÷\n4、三角函数\n0、退出"); Scanner inScanner = new Scanner(System.in); int flag=1; while(flag==1) { int op1=inScanner.nextInt(); switch(op1) { case 1: ex ex=new ex(); break; case 2: log log=new log(); break; case 3: cal4 cal=new cal4(); break; case 4: sj sj=new sj(); break; case 0: flag=0; } } System.out.println("计算结束"); } }