2019独角兽企业重金招聘Python工程师标准>>>
#include <stdio.h>
#include <math.h>
float fVal;
float fDecimal;
int iInteger;
//iInteger = (fVal * 10) / 10;
//fDecimal = fVal - iInteger
int main()
{
while(EOF != scanf("%f", &fVal)){
iInteger = (fVal * 10) / 10;
printf("iInteger: %d; fDecimal: %f\n", iInteger, fVal - iInteger);
}
return 0;
}