#include <stdio.h>
#include <stdio.h>
void main()
{
enum weekday {mon,tue,wed,thu,fri,sat,sun} day;
int count1=0,count2=0;
for(day=mon;day<=sun;day++){
switch(day){
case mon: case tue: case wed: case thu: case fri:
count1++;break;
case sat: case sun:
count2++;break;
default: break;
}
}
printf("A week includes %d workday, and %d weekend. \n",count1, count2);
}
// day=(enum weekday)(day+1)也可以