On 11/8/11 11:09 AM, Shawn H Corey wrote:
On 11-11-08 02:02 PM, Noah wrote:
I am trying to round to 10 or 100 for particular values

so the following numbers
530
570
2330
2590
3630
3660

would become
500
600
2300
2600
3600
3700

any clues how to do this well?

Make a more comprehensive list of what you're try to accomplish.

1 : 0
2 : 0
3 : 0
4 : 0
5 : 10
6 : 10
...
9 : 10
10 : 10
11 : 10
...
etc.


okay so I am trying to round to the nearest 10 or 100. There would need to be round up and round down capabilities.

So example numbers would be 530 rounds down to 500, 570 rounds up to 600, 2330->2300, 2590->2600, 3630 rounds down to 3600.

or another way to format this.

530->500
570->600
2330->3200
2590->2600
3630->3600
3660->3700

any clues on how to do this?

Cheers,
Noah




--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to