Rodne číslo - Zadanie 14

program rcc; uses crt; var rc: array [1..100] of int64; r,m,d:array [1..100] of integer; poh:array [1..100] of string; i,imax:integer; max,pom:int64; BEGIN max:=9999999999; for i:=1 to 5 do        BEGIN writeln ('Zadaj rodne cislo '); readln (rc[i]); pom:=rc[i] div 10000; d[i]:=pom mod 100; pom:=pom div 100; m[i]:=pom mod 100; pom:=pom div 100; r[i]:=pom; if m[i]>12 then BEGIN m[i]:=m[i]-50; poh[i]:='žena'; END else BEGIN if m[i]<=12 then BEGIN poh[i]:=' muž'; if rc[i]<max then BEGIN imax:=i; max:=rc[i]; END; END; END; writeln ('DEň: ',d[i],' mesiac: ',m[i],' rok: ',r[i],' pohlavie: ',poh[i]); END; writeln; writeln; writeln ('Najstarší muž zoznamu: '); write ('DEň: ',d[imax],' mesiac: ',m[imax],' rok: ',r[imax],' pohlavie: ',poh[imax]); readln; END.