C语言使用两种方式显示float类型的值,为什么打印出来是这个

#include <stdio.h>

int main(void){
    long double dip = 5.32e-5;

    printf("%Lf can be written %Le\n", dip, dip);
    return 0;
}

运行结果:

img

没发现题主的问题,vs2019。
img

自己找到原因了,gcc编译器默认不使用C99规范,编译的时候要加上参数-std=c99强制使用即可。

请问楼主,怎么解决这个问题,我也是用的GCC编译器,显示不正确。你后半句操作不来。