Скачать работу в формате MO Word.

Часовые пояса

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:\time\city.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(' Ïðîãðàììà: Time 1.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(2);

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 25 do

with base[i] do

writeln(i,') ',city);


delay(2);

window(13,23,68,23);

clrscr;

write('а Ââåäèòå öèôðó ïîä êîòîðîé ñòîèò íóæíóé ãîðîä:');

readln(i);

h:=h+base[i].raz-5;

if h>=24 then begin day:

if h<=-24 then begin day:

window(25,10,55,15);

textbackground(blue);

clrscr;

writeln('Äàòà: ',day,'.',month,'.',year);

writeln('Âðåìÿ: ',h,':',m);

writeln('Õîòèòå ïðîäîëæèòü? Yes-1 No-0');

readln(i);

if i=1 then goto b;

END.