#include <math.h> #include <stdio.h> int main(void) { double fraction, integer; double number = 100000.567; fraction = modf(number, &integer); printf("The whole and fractional parts of %lf are %lf and %lf\n", number, integer, fraction); return 0; }