#include <iostream.h>
enum WEEKDAY
{
sun,mon,tue,wed,thu,fri,sat
};
WEEKDAY nextDayof(WEEKDAY today)
{
if(today <7){
if (today==sat)
{
return sun;
}
return static_cast <WEEKDAY>(today+1);
}
else{
cout<<"input error" <<endl;
return static_cast <WEEKDAY>(-1);
}
}
void main()
{
int today, nextday;
cout <<"input today:";
cin>>today;
nextday=nextDayof(static_cast <WEEKDAY>(today));
switch(nextday){
case 0:
cout<<"the next day is :" <<"sun" <<endl;
break;
case 1:
cout <<"the next day is :" <<"mon" <<endl;
break;
case 2:
cout <<"the next day is :" <<"tue" <<endl;
break;
case 3:
cout <<"the next day is :" <<"wed" <<endl;
break;
case 4:
cout <<"the next day is :" <<"thu" <<endl;
break;
case 5:
cout <<"the next day is :" <<"fri" <<endl;
break;
case 6:
cout <<"the next day is :" <<"sat" <<endl;
break;
}
}