Printing To Screen: Difference between revisions

m
[unchecked revision][unchecked revision]
(Shorter itoa() implement.)
Line 50:
Just like in any environment, you repeatedly divide the value by the base, the remainder of the division giving you the least significant digit of the value.
 
For example, since 1234 = 4 + 3* 10 + 2 * 100 + 1* 1000, if you repeatedly divide "1234" by ten and use the resultremainder of the division, you get the digits:
 
<pre>
Line 103:
</source>
[http://www.strudel.org.uk/itoa/ And here is a shorter one]
 
== Troubleshooting ==
 
Anonymous user