+ 3
how to find the closest int value of a float in c++
for eg if float value is 0.85 then the int value must be 1 because it is closest to 1. Any function,,help!!!😢
3 Réponses
+ 24
double round(double d) {
return floor(d + 0.5);
}
+ 3
ty
for eg if float value is 0.85 then the int value must be 1 because it is closest to 1. Any function,,help!!!😢