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.

Make sure you include cases just before and just after every change. When you get such a list made, it's much easier to see how to create your functions.


--
Just my 0.00000002 million dollars worth,
  Shawn

Confusion is the first step of understanding.

Programming is as much about organization and communication
as it is about coding.

The secret to great software:  Fail early & often.

Eliminate software piracy:  use only FLOSS.

"Make something worthwhile."  -- Dear Hunter

--
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