Fusc sequence: Difference between revisions
Content deleted Content added
m →{{header|Haskell}}: Tidied |
|||
Line 956:
const MAX_N_DIGITS=5;
foreach( n; 0..N_FIRST ) n.fusc.format!"%d ".write;
writeln;
format!"First fusc number for each number of digits (1 to %d digits):"(MAX_N_DIGITS).writeln;
for(auto n=0, ndigits=0; ndigits<MAX_N_DIGITS; n++)
if( n.fusc.to!string.length > ndigits ){
format!"fusc(%d
ndigits = n.fusc.to!string.length.to!int;
}
}</lang>
{{Out}}
|