uses crt,dos;
var zadanyrok : word;
prestupny : boolean;
d,m,r,dvt : word;
begin
clrscr;
write('Zadej rok:');
readln(zadanyrok);
if zadanyrok<1582 then
begin
writeln('Tedhy jeste nebyl gregoriansky kalendar!');
readln();
halt(0);
end;
prestupny:=false;
if (zadanyrok div 4)*4=zadanyrok then prestupny:=true;
if (zadanyrok div 100)*100=zadanyrok then prestupny:=false;
if (zadanyrok div 400)*400=zadanyrok then prestupny:=true;
(*GetDate(r,m,d,dvt);
toto bylo zaremovano a nahrazenou konstantami, nebot
neni ucelem teto prace vytvaret funkce knihoven TP... *)
r:=2006; m:=12; d:=17; dvt:=5;
write('Rok ',zadanyrok);
case prestupny of
true : begin
if zadanyrok<r then write(' byl');
if zadanyrok=r then write(' je');
if zadanyrok>r then write(' bude');
end;
false : begin
if zadanyrok<r then write(' nebyl');
if zadanyrok=r then write(' neni');
if zadanyrok>r then write(' nebude');
end;
end;
writeln(' prestupny rok!');
readln;
end.
created by PaJa