New course! Every coder should learn Generative AI!
Try a free lesson+ 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 Answers
+ 24
double round(double d) {
return floor(d + 0.5);
}
+ 3
ty