0
How to use round function in c language?
Can anyone please explain me how to round off an input float? I need an example too..
1 Resposta
0
Hi Kari,
When rounding floating point numbers in C and other languages you have many options, like round down, round up, round to the nearest integer, etc. In the library math.h in C you can find:
floor: round down.
ceil: round up.
round: round to nearest integer.
You can find an explanation of these functions, as well as code examples in this site: http://www.cplusplus.com/reference/cmath/round/
Good coding.