uses crt;
var a:array[1..100]of integer;
i,n,tb:integer;
begin
clrscr;
write('Nhap n='); readln(n);
for i:=1 to n do
begin
write('A[',i,']='); readln(a[i]);
end;
tb:=0;
i:=1;
while i<=n do
begin
tb:=tb+a[i];
inc(i);
end;
writeln(tb/n:4:2);
readln;
end.
Đúng 0
Bình luận (0)