package mooc_6; import java.util.Scanner; public class MOOC_6 { private static int today; public static void main(String[] args) { Scanner sc=new Scanner(System.in); System.out.print("输入今天是星期几:"); String today; today = sc.nextLine(); switch(today){ case "一":/*注意引用文字时只能用单引号*/ case "三": case "五": System.out.println("吃包子"); break; case "二": case "四": case "六": System.out.println("吃油条"); break; case "日": System.out.println("吃主席套餐"); } } }这个想要实现输入今天是星期几,然后判断吃什么,该如何改
ccccfys
2014-11-06
0 回答
举报
0/150
提交
取消