Semiprime: Difference between revisions
→{{header|Euler}}: "syntax highlighting"
(Added Euler) |
(→{{header|Euler}}: "syntax highlighting") |
||
Line 1,241:
=={{header|Euler}}==
{{Trans|C++}}
<!-- syntaxhighlight lang="euler"> -->
'''begin''' '''new''' isSemiPrime; '''new''' x; '''label''' xLoop;
isSemiPrime <-
'''begin''' '''new''' a; '''new''' b; '''new''' c; '''label''' again;
again: '''if'''
'''else''' a
'''end''' '''else'''
x <- 1;
xLoop: '''if''' [ x <- x + 1 ] < 100 '''then''' '''begin'''▼
'''if''' isSemiPrime( x ) '''then''' '''out''' x '''else''' 0;
▲xLoop: if [ x <- x + 1 ] < 100 then begin
'''end''' '''else'''
'''end''' $
<!-- </syntaxhighlight> -->▼
▲</syntaxhighlight>
{{out}}
<pre>
|