Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,13 @@
|
|||
PROC mean = (REF[]REAL p)REAL:
|
||||
# Calculates the mean of qty REALs beginning at p. #
|
||||
IF LWB p > UPB p THEN 0.0
|
||||
ELSE
|
||||
REAL total := 0.0;
|
||||
FOR i FROM LWB p TO UPB p DO total +:= p[i] OD;
|
||||
total / (UPB p - LWB p + 1)
|
||||
FI;
|
||||
|
||||
main:(
|
||||
[6]REAL test := (1.0, 2.0, 5.0, -5.0, 9.5, 3.14159);
|
||||
print((mean(test),new line))
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue