Написал на паскале
const N = 12;
var i, sum:integer;
average:real;
A:array[1..N] of integer;
begin
for i:=1 to N do begin
A[i]:=random(101);
sum:=A[i]+sum;
write(A[i], ' ');
end;
writeln();
average:=sum/N;
if A[i] > average then
writeln(A[i]);
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Написал на паскале
const N = 12;
var i, sum:integer;
average:real;
A:array[1..N] of integer;
begin
for i:=1 to N do begin
A[i]:=random(101);
sum:=A[i]+sum;
write(A[i], ' ');
end;
writeln();
average:=sum/N;
for i:=1 to N do begin
if A[i] > average then
writeln(A[i]);
end;
end.