rint: returns the value of arg rounded to the nearest integer : rint « math.h « C / ANSI-C






rint: returns the value of arg rounded to the nearest integer


    

//Declaration: float rintf(float arg); 
               double rint(double arg); 
               long double rintl(long double arg);  
 

  

  #include <math.h>
  #include <stdio.h>

  int main(void)
  {

    printf("%f\n", rint (11));

    return 0;
  }

         
/*
11.000000
*/         

           
       








Related examples in the same category