import java.util.Scanner;
class homework2{
public static void main(String[] args){
Scanner input=new Scanner (System.in);
Scanner two=new Scanner (System.in);
System.out.print("请输入当前日期的第一个首字母(小写):");
String weekday=input.nextLine();
switch(weekday){
case "m":
System.out.println("m");
break;
case "w":
System.out.println("w");
break;
case "f":
System.out.println("f");
break;
case "t":
System.out.println("t");
break;
case "s":
System.out.print("请输入当前日期的第二个小写字母:");
weekday=two.nextLine();
if(two.equals("e")){
System.out.println("a");
}else if(two.equals("u")){System.out.println("u");//为啥这里判断好不输出了,写不下去了脑壳疼.
}
break;
default:
break;
}
}
}
相关分类