home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 September
/
Simtel20_Sept92.cdr
/
msdos
/
turbopas
/
pas_sci.arc
/
MEANS.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1985-07-21
|
651b
|
30 lines
program means; { -> 26 }
{find mean and standard deviation }
const max = 80;
type ary = array[1..max]of real;
var x : ary;
i,n : integer;
mean,std: real;
{$I MEANSTD.PAS}
begin { MAIN program }
ClrScr;
writeln;
writeln('Calculation of mean and standard deviation');
repeat
write('How many points? ');
readln(n)
until n<=max;
for i:=1 to n do
begin
write(i:3,':');
readln(x[i])
end;
meanstd(x,n,mean,std);
writeln(chr(7),'For ',n:3,' points, mean= ',mean:8:4,' sigma= ',std:8:4)
end. { MAIN program }