#include<stdio.h>
main()
{
int day;
scanf("%d",&day);
switch(day)
{
case 1:printf("Monday\n");
case 2:printf("Tuesday\n");
case 3:printf("Wednesday\n");
case 4:printf("Thursday\n");
case 5:printf("Friday\n");
case 6:printf("Saturday\n");
case 7:printf("Sunday\n");
default:printf("error\n");
}
}



改后版
程序修改如下：
#include<stdio.h>
main()
{
int day;
scanf("%d",&day);
switch(day)
{
case 1:printf("Monday\n");break;
case 2:printf("Tuesday\n");break;
case 3:printf("Wdenesday\n");break;
case 4:printf("Thursday\n");break;
case 5:printf("Friday\n");break;
case 6:printf("Saturday\n");break;
case 7:printf("Sunday\n");break;
default:printf("error\n");break;
}
}

