小编use*_*052的帖子

lcc printf浮点

我有以下程序:

#include <stdio.h>

int main(int args, char *argv[]) {
    printf("%f\n", 0.99999);
    printf("%e\n", 0.99999);
}
Run Code Online (Sandbox Code Playgroud)

结果是:

0.009990
9.999900e-001
Run Code Online (Sandbox Code Playgroud)

为什么第一个数字错了?我使用Windows XP,编译器"Logiciels Informatique lcc-win32 version 3.8.编译日期:2012年11月30日19:38:03".

c floating-point windows-xp

7
推荐指数
1
解决办法
145
查看次数

标签 统计

c ×1

floating-point ×1

windows-xp ×1