C - Rounding number up

Posted by Dave on Stack Overflow See other posts from Stack Overflow or by Dave
Published on 2010-03-11T05:20:36Z Indexed on 2010/03/11 5:23 UTC
Read the original article Hit count: 193

Filed under:
|
|
|

Hi all,

I was curious to know how I can round a number to the nearest tenth. For instance If I had

int a = 59 / 4 /* which would be 14.75 and how can i Store the number as 15 in "a"*/

Thanks,

Dave

© Stack Overflow or respective owner

Related posts about c

    Related posts about math