var i,max:integer; fio:string; x:array[1..5] of integer;
F1,F2:text;
begin
assign(F1, 'out.txt'); assign(F2, 'out2.txt');
rewrite(F1); rewrite(F2);
for i:=1 to 5 do
begin
writeln('daite FIO ',i,'-ogo rabotnika'); readln(fio);
writeln('daite otklad rabotnika ',i); readln(x[i]);
writeln(F1, i,' ',fio,' ',x[i]); fio:='';
end;
max:=x[1];
for i:=1 to 5 do if x[i]>max then max:=x[i];
writeln(F2, max); close(F1); close(F2);
readln;
end.
rabotatet! proveril v PASCALE