参考代码:
import java.util.Scanner; public class Main { public static void main(String[] args) { String s; int day = new Scanner(System.in).nextInt(); switch(day) { case 0: s = "Sunday"; break; case 1: s = "Monday"; break; case 2: s = "Tuesday"; break; case 3: s = "Wednesday"; break; case 4: s = "Thursday"; break; case 5: s = "Friday"; break; case 6: s = "Saturday"; break; default: s = "input error!"; } System.out.print(s); } }
0.0分
5 人评分
C语言程序设计教程(第三版)课后习题6.9 (C语言代码)浏览:744 |
Tom数 (C++代码)浏览:868 |
C二级辅导-统计字符 (C语言代码)浏览:528 |
C语言训练-求函数值 (C语言代码)浏览:976 |
C语言程序设计教程(第三版)课后习题8.3 (C语言代码)浏览:436 |
C语言程序设计教程(第三版)课后习题8.5 (C语言代码)浏览:562 |
P1000 (C语言代码)浏览:911 |
C语言程序设计教程(第三版)课后习题5.7 (C语言代码)浏览:537 |
1035 题解浏览:875 |
2004年秋浙江省计算机等级考试二级C 编程题(1) (C语言代码)浏览:331 |