这个数字为什么要进位呢
#include <stdio.h>main()
{
double a=123.453643,b,c;
b=a*100+0.5;
c=b/100;
printf("四舍五入为:%.2f",c);
}
这个程序应该是123.45,不知道为什么输出来是123.46,求指点。
2012-06-03 21:42
2012-06-05 21:24
2012-06-05 21:38
2012-06-05 21:40