求大神帮忙看看小弟的代码哪里不对啊?怎么输出总是显示0元?
#include<stdio.h> double getcharge(int mile,int time) { double unit; if(time<23 && time>=5) { if(mile>3) { unit=14+(mile-3)*2.3; } else if(mile>3) { unit=14+(mile-3)*2.76; } else if (mile<3) { unit=14; } } return 0; } int main() { double x; double y; double price; x=getcharge(12,9); y=getcharge(12,6); price=x+y; printf("小明每天打车费用为%.1f元\n",price); return 0; }