Skip to main content
Ivin Holmes
Associate
February 28, 2020
Question

I need to develop application using round function. The current math.h doesn't seem to support this function. Can anyone help

  • February 28, 2020
  • 1 reply
  • 1201 views

..

This topic has been closed for replies.

1 reply

PMath.4
Senior III
February 29, 2020
int round(double number)
{
 return (number >= 0) ? (int)(number + 0.5) : (int)(number - 0.5);
}

Ivin Holmes
Associate
February 29, 2020
Thanks