var days array 12 of integer 31 28 31 30 31 30 31 31 30 31 30 31 integ

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
var days:array [1..12] of integer :=(31,28,31,30,31,30,31,31,30,31,30,31);
x,y:integer;
function visokostnuu(y:integer):boolean;
begin
if(y mod 100 = 0) then
begin
if(y mod 400 = 0) then visokostnuu:=true
else visokostnuu:=false;
end
else if(y mod 4 = 0) then visokostnuu:=true
else visokostnuu:=false;
end;
function func3(y,m:integer):integer;
begin
if (visokostnuu(y)) then
begin
if (m=2) then func3:=29
else func3:=days[m];
end
else func3:=days[m];
end;
function func6(d1,m1,y1,d2,m2,y2:integer):integer;
begin
func6:=abs(func5(d1,m2,y1)-func5(d2,m2,y2));
end;