小编cod*_*ode的帖子

Scanf没有读取双倍

我试图double从用户不断读取值scanf.

码:

printf("Enter A value: \n");
double input;
int result = scanf("%f", &input);
printf("INPUT: %f\n", input);
Run Code Online (Sandbox Code Playgroud)

输出是

INPUT: 0.000
Run Code Online (Sandbox Code Playgroud)

c floating-point double scanf

0
推荐指数
1
解决办法
1597
查看次数

标签 统计

c ×1

double ×1

floating-point ×1

scanf ×1