uses crt,dos;
type str=record
city:string;
raz:integer;
end;
label b;
var
f:text;
i:integer;
base:array[1..25]of str;
year, month, day,dow, h, m, s, hund:word;
procedure zapis;
begin
assign(f,'a:timecity.txt');
reset(f);
for i:=1 to 25 do
with base[i] do
begin
readln(f,city);
readln(f,raz);
end;
end;
BEGIN
b:textbackground(0);
clrscr;
window(25,1,55,1);
textbackground(6);
clrscr;
write(' Ïðîãðàììà: Time1.0');
getdate(year,month,day,dow);
gettime(h,m,s,hund);
window(5,3,35,5);
clrscr;
writeln;
writeln(' Òåêóùàÿäàòà: ',day,'.',month,'.',year);
window(45,3,75,5);
clrscr;
writeln;
writeln(' Òåêóùååâðåìÿ: ',h,':',m);
delay(2000);
zapis;
window(13,7,68,7);
clrscr;
write(' Âûáåðèòå ãîðîäâ êîòîðîìíåîáõîæèìîïîñìîòðåòüâðåìÿ:');
window(5,9,35,21);
clrscr;
for i:=1 to 12 do
with base[i] do
writeln(i,')',city);
write('13)',base[13].city);
window(45,9,75,21);
clrscr;
for i:=14 to 25do
with base[i] do
writeln(i,') ',city);
delay(2000);
window(13,23,68,23);
clrscr;
write(' Ââåäèòåöèôðó ïîäêîòîðîéñòîèò íóæíóéãîðîä:');
readln(i);
h:=h+base[i].raz-5;
if h>=24 thenbegin day:°y+1; h:=h-24; end;
if h
window(25,10,55,15);
textbackground(blue);
clrscr;
writeln('Äàòà:',day,'.',month,'.',year);
writeln('Âðåìÿ:',h,':',m);
writeln('Õîòèòåïðîäîëæèòü? Yes-1No-0');
readln(i);
if i=1 then gotob;
END.