Right now I would like to understand how I can take a number, ex: 42.5 and round it up or down to the closest number that ends on 9.
As in: 42.5 would be 39 but 47 would be 49
lucy24
10:44 pm on Feb 27, 2014 (gmt 0)
Which direction do you want 44 to go?
:: thinking ::
Add 1, divide by 10, round to an integer.
I Will Make It
10:48 pm on Feb 27, 2014 (gmt 0)
I didn't think of that scenario ;) But up :) I'm making a small code that takes the cost price from my supplier, and converts into the saleprice on my webshop :)
Thank you for your quick response!
LifeinAsia
12:16 am on Feb 28, 2014 (gmt 0)
add 1, divide by 10, round to an integer, multiply by 10, subtract 1. :)
lucy24
3:00 am on Feb 28, 2014 (gmt 0)
"Having reduced the problem to a previously solved one, the mathematician went back to sleep." :)