Not quite ... it'll only print the 9s! I'd suggest:
...roboticusprint "num=$num, result=", ($num ? substr("912345678", $num%9, 1) : 0) +, "\n";
In reply to Re^2: Question on Recursion
by roboticus
in thread Question on Recursion
by prasadbabu
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |