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






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


    

//Declaratoin: float roundf(float arg); double round(double arg); long double roundl(long double arg);  
 

// Values precisely between two values, such as 3.5, are rounded up.
  


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

  int main(void)
  {
    printf("%f\n", round (3.2));

    return 0;
  }

         
        /*3.000000*/ 

           
       








Related examples in the same category