又要麻烦大家看程序了,在线等
#include<stdio.h>
main()
{int temp;
printf("inpute number\n");
scanf("%d",&temp );
switch(temp) ;
{case 1:printf("monday\n");break;
case 2:printf("tuesday\n");break;
case 3:printf("wednsday\n");break;
case 4:printf("thurday\n");break;
case 5:printf("friday\n");break;
case 6:printf("saratday\n");break;
case 7:printf("sunday\n");break;
default:printf("error\n");
}
}
提示
错误 noname.c 8: Case 转换错误在 main 函数中
错误 noname.c 8: 'break' 位置错在 main 函数中
参考答案:switch(temp)后面的标点符号错了