为什么算出来是83,而不是83.2?
#include <stdio.h>
int huafei(int a)
{
float sum1;
sum1=2*(13+12*2.3+1)*a;
return sum1;
}
int main()
{
float money;
money=huafei(1);
printf("小明每天打车的总费用:%.2f",money);
return 0;
}
#include <stdio.h>
int huafei(int a)
{
float sum1;
sum1=2*(13+12*2.3+1)*a;
return sum1;
}
int main()
{
float money;
money=huafei(1);
printf("小明每天打车的总费用:%.2f",money);
return 0;
}
2019-11-17
举报