publicclassDemo1{publicstaticvoidmain(string[] args){ scanner input=newscanner(system.in);for(boolean i=true;i;){ system.out.print("请你输入一个数值:")int num=input.nextInt();switch(num){case0: i=false; system.out.println("程序结束");break;case1: system.out.print(num+":MON");break;case2: system.out.print(num+":TUE");break;case3: system.out.print(num+":WED");break;case4: system.out.print(num+":THU");break;case5: system.out.print(num+":FRI");break;case6: system.out.print(num+":SAT");break;case7: system.out.print(num+":SUN");break;default: system.out.print("请重新输入");}}}}