Narcissistic decimal number: Difference between revisions
Content added Content deleted
Line 761: | Line 761: | ||
0 1 2 3 4 5 6 7 8 9 153 370 371 407 1634 8208 9474 54748 92727 93084 548834 1741725 4210818 9800817 9926315 |
0 1 2 3 4 5 6 7 8 9 153 370 371 407 1634 8208 9474 54748 92727 93084 548834 1741725 4210818 9800817 9926315 |
||
</pre> |
</pre> |
||
=={{header|EasyLang}}== |
|||
<syntaxhighlight lang="easylang"> |
|||
proc prime x . r . |
|||
for i = 2 to sqrt x |
|||
if x mod i = 0 |
|||
r = 0 |
|||
break 2 |
|||
. |
|||
. |
|||
r = 1 |
|||
. |
|||
for i = 2 to 999 |
|||
call prime i r |
|||
if r = 1 |
|||
ind += 1 |
|||
sum += i |
|||
call prime sum r |
|||
if r = 1 |
|||
print ind & ": " & sum |
|||
. |
|||
. |
|||
. |
|||
</syntaxhighlight> |
|||
==={{header|FreeBASIC}}=== |
==={{header|FreeBASIC}}=== |