program sched2-d; uses crt; { This program will use an array to record what class the user has for each of 7 periods, then it will print out the name of the course that the user wishes to view. by } var schedule : array[1..4,1..7] of string[15]; x,y:integer; procedure input; begin writeln ('Enter what class you have for period -'); for x := 1 to 7 do begin write (x,' : '); readln (schedule[y,x]); end; end; begin clrscr; writeln ('Freshman :'); y := 1; input; clrscr; writeln ('Sophmore :'); y := 2; input; clrscr; writeln ('Junior :'); y := 3; input; clrscr; writeln ('Senior :'); y := 4; input; delay (500); clrscr; repeat writeln ('What year do you want to look at?'); writeln ('(1 for Freshman, 2 for Sophmore, ect - Press ''0'' to quit or ''5'' for all)'); readln (y); if (y >= 1) and (y <= 4) then begin writeln ('What period do you want to look at?'); readln (x); if (x >= 1) and (x <= 7) then begin writeln; writeln; writeln ('During period ',x,', you have ',schedule[y,x]); readkey; end; end; if y = 5 then begin for y := 1 to 4 do begin writeln; for x := 1 to 7 do writeln ('Year ',y,', period ',x,' : ',schedule[y,x]); if wherey > 19 then begin writeln; write ('--More--'); readkey; clrscr; end; end; readkey; end; clrscr; until y = 0; end.