How to control the number of digits when printing numbers?
<p>I need assistance with a code, the final answer needs to be 6 characters, I am asking the person for a number, they can enter the following:</p>

<pre><code> 1, 10, 100, 1000, 10000
</code></pre>

<p>What I need is the final number to be 6 characters long so this is the answers for each of the numbers</p>

<pre><code>1     =&gt; 000001
10    =&gt; 000010
100   =&gt; 000100
1000  =&gt; 001000
10000 =&gt; 010000
</code></pre>

<p>So I need to set the length at 6 digits, enter the number and add "0" to the front until it is 6 digits. </p>

<p>How can I do that?</p>

<p>Additional to this if someone enters 200 I need it to round down to 100 and if they enter 501 it rounds up to 1000; can this also be done?</p>
