C Tutorial/math.h/trunc

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

trunc

Item Value Header file

  1. include <math.h>

Declaration float truncf(float arg);double trunc(double arg);long double truncl(long double arg); Return returns the truncated value of arg.


#include <math.h>
  #include <stdio.h>
  int main(void)
  {
    printf("%f\n", trunc (1.2));
    return 0;
  }