Factorions: Difference between revisions
Content added Content deleted
(Added Sidef) |
m (→{{header|REXX}}: changed program indentations, added whitespace to program and output.) |
||
Line 438:
if lim=='' | lim=="," then lim= 1500000 - 1 /* " " " " " " */
do fact=0
end /*fact*/
do base=LOb to HIb /*process all the required bases. */
@= 1 2 /*initialize the list (@) to null. */
do j=3 for lim-2;
do until t==0; d= t // base
$= $ + !.d
t= t % base
end /*until*/
if $==j then @= @ j
end /*i*/
say
say 'The factorions for base ' right( base, length(HIb) ) " are: "
end
exit /*stick a fork in it, we're all done. */
/*──────────────────────────────────────────────────────────────────────────────────────*/
Line 459:
{{out|output|text= when using the default inputs:}}
<pre>
The factorions for base 9 are: 1 2 41282
The factorions for base 10 are: 1 2 145 40585
|