program svs;
const n=7;
var a:array[1..n] of integer;
i,sum:integer;
sarif:real;
begin
sum:=0;
sarif:=0;
writeln ('введите массив');
for i:=1 to n do
write('введите A[',i,']:');
readln(a[i]);
sum:=sum+a[i];
end;
sarif:=sum/n;
writeln ('среднее арифметическое = ',sarif:4:2);
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
program svs;
const n=7;
var a:array[1..n] of integer;
i,sum:integer;
sarif:real;
begin
sum:=0;
sarif:=0;
writeln ('введите массив');
for i:=1 to n do
begin
write('введите A[',i,']:');
readln(a[i]);
sum:=sum+a[i];
end;
sarif:=sum/n;
writeln ('среднее арифметическое = ',sarif:4:2);
end.