C Tutorial/math.h/remainder — различия между версиями

Материал из C\C++ эксперт
Перейти к: навигация, поиск
м (1 версия: Импорт контента...)
 
м (1 версия: Импорт контента...)
 
(нет различий)

Текущая версия на 13:32, 25 мая 2010

remainder

Item Value Header file math.h Declaration float remainderf(float a, float b);double remainder(double a, double b);long double remainderl(long double a, long double b); Return returns the remainder of a/b.


<source lang="cpp">#include <math.h>

 #include <stdio.h>
 int main(void)
 {
   double x = 10.0, y = 0.0;
   do {
     printf("%f\n", remainder (x, y+1));
     y++;
   } while(y<11.0);
   return 0;
 }</source>