#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int main()
{
int day = 0;
printf("请输入数字\n");
scanf("%d", &day);
switch (day)
{
case 1:
case 2:
case 3:
case 4:
case 5:
printf("工作日\n");
break;
case 6:
printf("星期六\n");
break;
case 7:
printf("星期天\n");
break;
}
/*int num = 1;
while (num < 101)
{
if (1 == num % 2)
printf("%d ", num);
num++;
}
作业:输出1-100的奇数
*/
return 0;
}
标签:语句,case,num,int,break,swich,printf,day From: https://blog.51cto.com/u_15880362/5890745