#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
enum
{
MONDAY=1,
TUESDAY,
WEDNESDAY,
THURSDAY,
FRIDAY,
SATURDAY,
SUNDAY
};
int main()
{
while (1)
{
int n = 0;
printf("请输入1-7的数,0退出\n");
scanf("%d", &n);
switch (n)
{
case 0:printf("已退出\n");return 0;
case 1:printf("星期%d\n", MONDAY); break;
case 2:printf("星期%d\n", TUESDAY); break;
case 3:printf("星期%d\n", WEDNESDAY); break;
case 4:printf("星期%d\n", THURSDAY); break;
case 5:printf("星期%d\n", FRIDAY); break;
case 6:printf("星期%d\n", SATURDAY); break;
case 7:printf("星期%d\n", SUNDAY); break;
default:printf("err\n"); break;
}
}
return 0;
}