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.
unit math;
var
d,m:array[1..20] of integer;
sr:real;
kol,s:integer;
Begin
for i:=1 to 20 do begin
d[i]:=RandomRange(140,180);
writeln('Рост ',i,'-ой девочки =',d[i],' см');
m[i]:=RandomRange(140,190);
writeln('Рост ',i,'-го мальчика= ',m[i],' см');
end;
s:=0;sr:=0;kol:=0;
for i:=1 to 20 do s:=s+m[i];
sr:=s/20;
writeln('Средний рост мальчиков= ',sr,' см');
for i:=1 to 20 do
if d[i]>sr then kol:=kol+1;
writeln('Колличество девочек превышающий средний рост мальчиков= ',kol);
End.
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.