代码运行良好,一切正常;
printf("\nEnter number of hours ");
scanf("%f", &hours);
{
if (hours>=5) {
calc_charge=minimum_fee;
bill = hours * minimum_fee;
printf("%i", &bill);
}
else
if(hours>=8) {
bill=hours*mini_fee;
printf("%i", &bill);
}
else
if (hours <= 24) {
bill = hours*maximum_fee;
printf("%i", &bill);
}
while (hours >= 4) {
bill = hours*minimum_fee;
printf("%i", &bill);
}
但输出是
34525160134525160134525160134525160134525160134525160134525160134525160134525160134525160134525160134525160134525160134525160134525160134525160134525160134525160134525160134525160134525160134525160134525160134525160134525160134525160134525160134525160134525160134525160134525160134525160134525160134525160134525160134525160134525160134525160134525160134525160134525160
我似乎找不到任何问题,代码只是没有进行计算。为什么不?