-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnew_test.c
More file actions
33 lines (32 loc) · 742 Bytes
/
Copy pathnew_test.c
File metadata and controls
33 lines (32 loc) · 742 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include <stdio.h>
#include <stdlib.h>
int main(){
//检查枚举类型的输入输出
enum week{MON=1,TUES,WEDN,THIR,FIR,SAT,SUN};
enum week day;
printf("输入星期几?\n");
scanf("%d",&day);
switch(day){
case MON:
printf("MON:%d\n",day);
break;
case TUES:
printf("TUES:%d\n",day);
break;
case WEDN:
printf("WEDN:%d\n",day);
break;
case THIR:
printf("THIR:%d\n",day);
break;
case FIR:
printf("FIR:%d\n",day);
break;
case SAT:
printf("SAT:%d\n",day);
break;
case SUN:
printf("SUN:%d\n",day);
break;
}
}