Answers for "round function in C"

C
1

c round function

#include <math.h>

   double round(double x);
   float roundf(float x);
   long double roundl(long double x);
Posted by: Guest on May-14-2020
3

round C

float f = 0.5;

round(f);
Posted by: Guest on August-05-2020
0

round function in C

#include <stdio.h>
#include <math.h>
 int main()
{
       float i=5.4, j=5.6;
       printf("round of  %f is  %f\n", i, round(i));
       printf("round of  %f is  %f\n", j, round(j));
       return 0;
}
Posted by: Guest on July-30-2021

Code answers related to "C"

Browse Popular Code Answers by Language