program MeiJu(input,output);
type
daytype=(sun,mon,tue,wed,thu,fri,sat);
var
today,tomorrow:daytype;
d,mmmm,dddd:integer;
begin
write('Please input month,day:');
read(mmmm,dddd);
case mmmm of
1:d:=0;
2:d:=31;
3:d:=31+28;
4:d:=31+28+31;
5:d:=31+28+31+30;
6:d:=31+28+31+30+31;
7:d:=31+28+31+30+31+30;
8:d:=31+28+31+30+31+30+31;
9:d:=31+28+31+30+31+30+31+31;
10:d:=31+28+31+30+31+30+31+31+30;
11:d:=31+28+31+30+31+30+31+31+30+31;
12:d:=31+28+31+30+31+30+31+31+30+31+30;
end;
d:=d+dddd;
d:=d+2;{XiuZheng}
d:=d mod 7;
writeln(d);
case d of
0:today:=sun;
1:today:=mon;
2:today:=tue;
3:today:=wed;
4:today:=thu;
5:today:=fri;
6:today:=sat;
end;
if today=sat
then tomorrow:=sun
else tomorrow:=succ(today);
write('Tomorrow is ');
case tomorrow of
sun:writeln('Sunday');
mon:writeln('Monday');
tue:writeln('Tuesday');
wed:writeln('Wednsday');
thu:writeln('thursday');
fri:writeln('friday');
sat:writeln('saturday');
end;
end.
本站文章皆为作者原创,其它媒体(包括但不限于报刊、杂志、网站、电视、电台)未经作者书面许可严禁转载(或部分摘录)!
