SHOW:
|
|
- or go back to the newest paste.
| 1 | :Input a,"Num to stringify" | |
| 2 | :0->b | |
| 3 | :while ipart(a) != 0 | |
| 4 | - | :then |
| 4 | + | |
| 5 | :b+1->b | |
| 6 | :end | |
| 7 | :" "->str1 | |
| 8 | :while a != 0 | |
| 9 | :if b = 0 | |
| 10 | - | :then |
| 10 | + | |
| 11 | :a*10->a | |
| 12 | :str1+sub("0123456789",ipart(a)+1,1)->str1
| |
| 13 | :fpart(a)->a | |
| 14 | :b-1->b | |
| 15 | :end | |
| 16 | :sub(str1,2,length(str1))->str1 | |
| 17 | :disp str1 |