Narcissistic decimal number: Difference between revisions

Content added Content deleted
No edit summary
(add BQN)
Line 644: Line 644:


<pre>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>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>

=={{header|BQN}}==

<code>B10</code> is a BQNcrate idiom to get the digits of a number.

<lang bqn>B10 โ† 10{โŒฝ๐•—|โŒŠโˆ˜รทโŸœ๐•—โŸ(โ†•1+ยทโŒŠ๐•—โ‹†โผ1โŒˆโŠข)}
IsNarc โ† {๐•ฉ=+ยดโ‹†โŸœโ‰ B10 ๐•ฉ}

/IsNarc โ†•150</lang><lang>โŸจ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โŸฉ</lang>


=={{header|C}}==
=={{header|C}}==