Narcissistic decimal number: Difference between revisions
m
→{{header|Perl}}: now with v5.36, add output
Drkameleon (talk | contribs) |
SqrtNegInf (talk | contribs) m (→{{header|Perl}}: now with v5.36, add output) |
||
Line 3,463:
=={{header|Perl}}==
Simple version using a naive predicate
<lang perl>
my $n = shift;▼
sub is_narcissistic ($n) {
$
}
while (@N < 25) {
$i++ while
push @N, $i++
}
say join ' ', @N;</lang>
{{out}}
<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|Phix}}==
|