Piprimes: Difference between revisions
→{{header|ALGOL 68}}: Use ALGOL 68-primes
m (→{{header|REXX}}: changed whitespace and comments, added a foot separator for the output.) |
(→{{header|ALGOL 68}}: Use ALGOL 68-primes) |
||
Line 13:
=={{header|ALGOL 68}}==
{{libheader|ALGOL 68-primes}}
<lang algol68>BEGIN # Show some values of pi(n) - the number of priems <= n #
# show pi(n) for n up to 21 #
INT max
INT max pi
PR read "primes.incl.a68" PR
[]BOOL prime
INT pi := 0;
FOR i TO
WHILE IF prime[ i ] THEN pi +:= 1 FI;
pi <= max pi
Line 50 ⟶ 40:
20 20 21 21 21 21 21 21
</pre>
=={{header|Arturo}}==
|