Is there any better way to define PreviousDay Function???
plz let me know..
enum weekdayT { Monday,Tuesday,Wednesday,Thrusday,Friday,Saturday,Sunday };
weekdayT NextDay(weekdayT day){
return weekdayT((day+1)%7);
}
weekdayT PreviousDay(weekdayT day){
if(day==0)
return weekdayT(day+6);
else
return weekdayT((day-1)%7);
}