小编use*_*651的帖子

如何打印最大可能的浮点数并在C中加倍?

对于以下代码,

#include <stdio.h>
#include <limits.h>
#include <float.h>

int main(void) {
    printf("double max = %??\n", DBL_MAX);
    printf("double min = %??\n", DBL_MIN);
    printf("double epsilon  = %??\n", DBL_EPSILON);
    printf("float epsilon  = %??\n", FLT_EPSILON);
    printf("float max = %??\n", FLT_MAX);
    printf("float min = %??\n\n", FLT_MIN);
    return 0;
}
Run Code Online (Sandbox Code Playgroud)

为了让printf将各种数量显示为适当大小的十进制数,我必须使用哪些说明符代替??

c floating-point double printf limits

2
推荐指数
1
解决办法
6496
查看次数

标签 统计

c ×1

double ×1

floating-point ×1

limits ×1

printf ×1