Anonymous user
Printing To Screen: Difference between revisions
m
→Printing Integers
[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
<pre>
Line 103:
</source>
[http://www.strudel.org.uk/itoa/ And here is a shorter one]
== Troubleshooting ==
|