int long( int n) { int money=0; if(n<=3) { money=13+1; return money; } else { return money=(13+(n-3)*2.3)*2; } } int main() { int x=12; //int time1=9; printf("乘车费用为:%d"long(x)); return 0; }
float long(int n){float money;if(n<=3){money=2*(13+1) return money;} else { returm (13+(n-3)*2.3+1)*2 }}
int main(){int x=12; printf("小明明天乘车的总费用为:%..1f",long(x));}