program New_year;
uses timerecord,saluttpu,graph;
var
year: record
mounth:integer;
Day:integer;
hour:integer;
minute:integer;
shownewyear:boolean;
END;
salut,putin: boolean;
speach: string;
Gm,Gd:integer;
f:text;
begin
repeat
settime(year);
if (year.mounth=12) then
begin
if (year.day=31) then
begin
if (year.hour=23) then
begin
if (year.minute=59) then begin
year.shownewyear=true;
putin=true;
salut=true;
end;end;end;
if (year.shownewyear and putin and salut) then
begin
assign(f,'speach.txt');
reset(f);
readln(f,speach);
putinspeach(speach);
gm:=VGA;
gd:=vgahi;
InitGraph(gm,gd,'');
if GraphResult<>grOK then begin writeln('Ho-ho-fucking ho! Дед мороз умер, нового года не будет!'); readln; halt;
for i:=1 to saluttputimes do saluttpustart[i];
OutTextXY(getmaxx div 2, getmaxy div 2, 'Happy new Year!!!');
CloseGraph;
end;
end.