Totient function: Difference between revisions
m
→{{header|ALGOL-M}}
No edit summary |
|||
Line 342:
COMMENT - EXERCISE THE FUNCTION;
INTEGER N, TOTIENT, COUNT;
WRITE("
FOR N := 1 STEP 1 UNTIL 25 DO
BEGIN
Line 349:
END;
COMMENT - AND USE IT TO
WRITE("");
COUNT := 0;
Line 367:
Limiting the search to 1000 keeps the running time of the program within reasonable bounds.
<pre>
1 1 NO
2 1 YES
Line 397:
PRIMES UP TO 1000 = 168
</pre>
=={{header|APL}}==
|