simple/collatz/modf.c

16 lines
216 B
C
Raw Permalink Normal View History

2015-08-25 17:40:53 +02:00
#include <stdio.h>
#include <math.h>
int main(void) {
double x = 3.14;
double y, z;
y = modf(x, &z);
printf("%g, %g\n", y, z);
y = modf(x, NULL);
printf("%g, %g\n", y, z);
return 0;
}