Odd and square numbers: Difference between revisions
→{{header|Euler}}: Sybntax highlight with Mediawiki markup
imported>Maxima enthusiast No edit summary |
(→{{header|Euler}}: Sybntax highlight with Mediawiki markup) |
||
Line 392:
Same algorithm as the Algol and other samples.
<br>Note formatted output is not Euler's strong point...
'''begin'''▼
'''new''' toNext; '''new''' oddSquare; '''label''' again;▼
▲begin
▲ new toNext; new oddSquare; label again;
toNext <- 0;
again:▼
'''if''' oddSquare < 1000 '''then''' '''begin'''
▲again:
'''if''' oddSquare
'''end''' '''else''' 0▼
▲ end else 0
'''end''' $▼
▲end $
{{out}}
<pre>
|