Rounding
Author |
Message |
Neo
|
Posted: Tue Nov 23, 2004 10:20 pm Post subject: Rounding |
|
|
How would I round a number to the nearst ten. Say I had 12 I want it to be changed to 10 or say I had 115 then I would want it to be 120. I looked in turing reference and can only find the floor and ceiling function to round a real number to an int. |
|
|
|
|
|
Sponsor Sponsor
|
|
|
zylum
|
Posted: Tue Nov 23, 2004 11:18 pm Post subject: (No subject) |
|
|
first you would want to divide by ten, then round and then multiply by ten again |
|
|
|
|
|
Neo
|
Posted: Tue Nov 23, 2004 11:31 pm Post subject: (No subject) |
|
|
Thanks, Im an idiot. |
|
|
|
|
|
|
|