C/math.h/llround

Материал из C\C++ эксперт
Версия от 13:22, 25 мая 2010; Admin (обсуждение | вклад) (1 версия: Импорт контента...)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к: навигация, поиск

llround: returns the value of arg rounded to the nearest long long integer

<source lang="cpp">

//Declaratin: long long int llroundf(float arg);

             long long int llround(double arg); 
             long long int llroundl(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("%l", llround (1.2));
   return 0;
 }


      </source>