What people are calling attention to is that your examples show us what you want for numbers 1-4 digits long, and the rule is different for numbers that are 1-3 digits long, and numbers that are 4 digits long. If we knew you were only ever interested in numbers 1-4 digits long, that'd be all we needed to know.
But if you're potentially interested in longer numbers, we're left with no idea what behavior you want or expect for numbers longer than 4 digits.
Basically, I don't know what to make of your 'etc.' above. Are numbers from 4-6 digits rounded to the next hundred, and then 7-9 digits rounded to the next thousand?
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|