News:

PlayBASIC2DLL V0.99 Revision I Commercial Edition released! - Convert PlayBASIC programs to super fast Machine Code. 

Main Menu

Get Decimal places

Started by kevin, July 27, 2005, 12:19:12 PM

Previous topic - Next topic

kevin

This tidbit div/mods up an integer displaying the value of each decimal place

PlayBASIC Code: [Select]
 Number=123456

Digits=8
For lp=Digits to 0 step -1
Base=10^lp
print Number/Base
Number=mod(Number,base)
next

sync
waitkey