public class Demo1{
public static void main(string[] args){
scanner input =new scanner(system.in);
for(boolean i=true;i;){
system.out.print(“请你输入一个数值:”)
int num=input.nextInt();
switch(num){
case 0:
i =false;
system.out.println(“程序结束”);
break;
case 1:
system.out.print(num+":MON");
break;
case 2:
system.out.print(num+":TUE");
break;
case 3:
system.out.print(num+":WED");
break;
case 4:
system.out.print(num+":THU");
break;
case 5:
system.out.print(num+":FRI");
break;
case 6:
system.out.print(num+":SAT");
break;
case 7:
system.out.print(num+":SUN");
break;
default:
system.out.print(“请重新输入”);
}
}
}
}