#include main() { float x; scanf("%e",&x); printf("%f",x); }
为什么这个代码输入35.12后结果是35.119999
因为浮点数误差造成的。你改成printf("%.2f",x),输出就是35.12了