0
About c++
How do we round numbers in c++ ??
3 Answers
0
#include <math.h>
int i=round(4.3)
0
Ok tnx man
0
You can also use ceil() to round up or floor to round down(). ceil(x) is pretty much equivalent to round(x+0.5) while floor(x) is round(x-0.5) (if x is a signed).