Rizka dewi

Program rata-rata;
uses wincrt;
var
x: array [1..100] of integer;
n,i,sum:integer;
mean: real;
begin
write('n:');readln(n);
sum:=0;
for i := 1 to n do
begin
write('x',i,'=');readln(x[i]);
sum:=sum+x[i];
end;
mean:= sum/n;
writeln('mean=',mean);
readln;
end.
0 Responses

Posting Komentar