新人问,问题。求解答
#include<stdio.h>int main(void)
{
float n1=3.0;
double n2=3.0;
long n3=2000000000;
long n4=1234567890;
printf("%.1e %.1e %.1e %.1e.\n",n1,n2,n3,n4);
printf("%ld %ld.\n",n3,n4);
printf("%ld %ld %ld %ld.\n",n1,n2,n3,n4);
return 0;
}
出来的结果
3.0e+000 3.0+000 3.1e+046 0.0e+000
2000000000 1234567890
0 10742266112 0 10742266112
结果为什么会这样,求解。
[此贴子已经被作者于2016-1-23 18:28编辑过]