This is one
version of http://www.gtoal.com/languages/algol60/TESTS/rand.a60.html
from your personal cache. The page may have changed since that
time. Click here for the current page. Since this page is stored on
your computer, publicly linking to this page will not
work.
Google may not be affiliated with the
authors of this page nor responsible for its content. This page may
be protected by copyright.
| |
begin;
comment
CREATE SOME RANDOM NUMBERS, PRINT THEM AND
PRINT THE AVERAGE.
;
integer NN;
NN := 20;
begin;
integer I;
real SUM;
VPRINT("RANDOM NUMBERS:");
SUM := 0;
for I := 1 step 1 until NN do
begin;
real X;
X := RAND;
SUM := SUM + X;
VPRINT(I, X);
end ;
VPRINT("AVERAGE IS:", SUM ÷ NN);
end ;
end ;