(* Techniques: Table method to store a set of elements in an array, each element can be outputted if the array postion is known. This program works out the remainder of any day in Jan, 2000, the remainder locates the position of the array so it can output the expected day of the week. *) {*Winnie Leung F.4CA (22)*} program DayofWeek; uses wincrt; var day:array [1..7] of string; date,offset:integer; ans:char; begin writeln('It is known that 1st Jan, 2000 is Saturday.'); writeln('This program works out the day of week in Jan, 2000 if the date is given.'); day[1]:='Sat';day[2]:='Sun';day[3]:='Mon';day[4]:='Tue'; day[5]:='Wed';day[6]:='Thur';day[7]:='Fri'; repeat write('Day of Jan, 2000'); readln(date); offset:=date mod 7; writeln(date,' of Jan, 2000 is ',day[offset]); write('Continue (Y/N) ?'); readln(ans); until ans='N' end.