每天总费用69.400002,不知道后面2怎么来的
#include <stdio.h> float sun(int time, int dis){ float sp = 13, p = 2.3, sum = 0; if(dis<=3){ sum = 13+1; }else{ if(time>=23 || time<5){ sum = 13+(dis-3)*2.3*1.2+1; }else{ sum = 13+(dis-3)*2.3+1; } } return sum; } int main() { float sum = sun(9,12)+sun(18,12); printf("总费用:%f",sum); return 0; }