program rata;
uses wincrt;
var i, n: integer;
x, sum, mean: real;
begin
writeln ('banyaknya data= ');
readln (n);
for i:=1 to n do
begin
writeln ('data ke',i,'= ');
readln (x);
sum:= sum+x;
end;
mean:=sum/n;
writeln('rata-rata= ', mean:9:4)
end.
Kamis, 05 Januari 2012
Langganan:
Posting Komentar (Atom)
0 komentar:
Posting Komentar