#include<stdio.h>
#include<stdlib.h>
enum
WeekDay{
Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday
};
main(){
//枚举,规定变量取值范围只能从预先定义好的值中选择
enum WeekDay day = Sunday;
printf("%d
",day);
}
#include<stdio.h>
#include<stdlib.h>
enum
WeekDay{
Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday
};
main(){
//枚举,规定变量取值范围只能从预先定义好的值中选择
enum WeekDay day = Sunday;
printf("%d
",day);
}