橘子味的心
标题:C库函数 - modf()

C库函数 - modf()

#include<stdio.h>

#include<math.h>



int main () {

   double x, fractpart, intpart;



   x = 8.123456;

   fractpart = modf(x, &intpart);



   printf("Integral part = %lf\n", intpart);

   printf("Fraction Part = %lf \n", fractpart);



   return(0);

}

目录

分类