Program n1;
Uses CRT;
Var A,B,C,sum: array[1..100] of Integer; srb: array[1..100] of Real;
i,k,n: integer; sr: real;
begin
ClrScr;
randomize;
Writeln('Vvedite kol-vo figuristov');
Readln(n);
Writeln('Rezultaty');
For i:=1 to n do
begin
a[i]:=random(10);
write(a[i]:4);
end;
writeln;
For i:=1 to n do
begin
b[i]:=random(10);
write(b[i]:4);
end;
writeln;
For i:=1 to n do
begin
c[i]:=random(10);
write(c[i]:4);
end;
writeln;
Writeln('Summa ballov');
For i:=1 to n do
begin
sum[i]:=a[i]+b[i]+c[i];
write(sum[i]:4);
srb[i]:=sum[i]/3;
if srb[i]>sr then begin sr:=srb[i]; k:=i; end;
end;
writeln;
Writeln('Srednii rezultat');
For i:=1 to n do
write(srb[i]:4:2,' ');
writeln;
writeln('Pobedil figurist ',k,' s rezultatom ',sr:2:2);
readln
end.