program p3_8 var m1 y1 m2 y2 integer begin write Vvedite nomer mesyaca

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
program p3_8;
var m1,y1, m2,y2, m,y : integer;
begin
write('Vvedite nomer mesyaca i god rogdeniya pervogo cheloveka (m1,y1): '); readln(m1, y1);
write('Vvedite nomer mesyaca i god rogdeniya vtorogo cheloveka (m2,y2): '); readln(m2, y2);
{tekushaya data}
m := 12; y := 2014;
m := y*12 + m; {obhsee kol-vo mesyacev}
m1 := y1*12 + m1; {kol-vo mecyacev y pervogo}
y1 := Trunc((m - m1)/12); {kol-vo let}
writeln('Kol-vo let pervomy - ',y1);
m2 := y2*12 + m2; {kol-vo mecyacev y vtorogo}
y2 := Trunc((m - m2)/12); {kol-vo let}
writeln('Kol-vo let vtoromy - ',y2);
readln;
end.