[Tutor] rounding

Alan Gauld alan.gauld at freenet.co.uk
Sun Jan 30 23:34:47 CET 2005


> histograms for. I'd like to round the data to the nearest 10, i.e if
> the value is 15.34  should we round down to 10? and conversely
rounding
> say 19.30 to 20. I'm thinking 15.5 and above would round up. Can
anyone
> point me a at a quick and painless way of achieving this?

divide by 10, round the result, multiply by 10.

HTH,

Alan G.



More information about the Tutor mailing list