in reply to Re: Question on Recursion
in thread Question on Recursion
Not quite ... it'll only print the 9s! I'd suggest:
...roboticusprint "num=$num, result=", ($num ? substr("912345678", $num%9, 1) : 0) +, "\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Question on Recursion
by JavaFan (Canon) on Jan 09, 2009 at 13:26 UTC | |
by roboticus (Chancellor) on Jan 09, 2009 at 13:29 UTC |