#include <stdio.h>int main(){ float coller(int x,int t); float a=coller(12,9)+coller(12,18); printf("打车总费用为:%f",a); return 0;}float coller(int x,int t){ float sum; if(x<=3) { sum=13; } else { if(t<5||t>=23) { sum=sum+(1.2*(x-3)*2.3); } else { sum=sum+(2.3*(x-3)); } return sum+1; }}
添加回答
举报
0/150
提交
取消