Программа на языке
TURBO
PASCAL:
program a1;
uses crt;
const k1='Input1.PAS'; k2='Output1.PAS';
var Input1,
Output1 :text;
l :integer;
n,k :longint;
begin clrscr; textcolor(11);
textbackground(7);
assign(INPUT1,k1); reset(INPUT1);
assign(Output1,
k2); rewrite(Output1);
read(Input1,n); reset(INPUT1); l:=0;
While not SeekEof(Input1) do begin
read(Input1,k);
if k>n then begin n:=k; l:=1; end
else if k=n then l:=l+1; end;
write('l=',l:3,' pas ',n:3);
write(Output1,l:3); Close(Output1)
end.