“ld returned 1 exit status ”在devc++中运行失败,上网百度无果
#include<stdio.h>#include<stdlib.h>
#define BASEPAY 10.00//每小时的工资金额
#define BASEHOUR 40//一周的上班时间
#define OVERTIME 1.5//加班计时倍数
#define BEFORE 300//第一笔税金
#define NEXT 150//第二笔税金
#define TAX_A 0.15//第一笔税金比例
#define TAX_B 0.20//第二笔税金比例
#define TAX_C 0.25//第三笔税金比例
float time (float t_hour);
float fnutax (float f_sum);
int main(void)
{
float hour=0;//定义变量
float sum,tax,wage;
sum=tax=wage=0;
printf("please input time:\n");
while((scanf("%f",&hour))==1)
{
time(hour);
sum=time(hour)*BASEPAY;
tax=fnutax(sum);
wage=sum-tax;
printf("sum=$%.2f,tax=$%.2f,wage=%.2f\n");
break;
}
system("PAUSE");
return 0;
}
float time(float t_hour)//工作小时计数
{
if(t_hour<=BASEHOUR)
t_hour=t_hour;
else
t_hour=(t_hour-BASEHOUR)*OVERTIME+BASEHOUR;
return t_hour;
}
float fnuax(float f_sum)//税金计算函数
{
if(f_sum<=BEFORE)
f_sum=f_sum*TAX_A;
else if(f_sum<=BEFORE+NEXT)
f_sum=(f_sum-BEFORE)*TAX_B+BEFORE*TAX_A;
else
f_sum=BEFORE * TAX_A + NEXT * TAX_B + (f_sum -BEFORE - NEXT) * TAX_C;
return f_sum;
}
求高手指教怎么改