C程序错误
我的一个C程序出错但不只不知道错在哪里,请高手指教,谢谢!#include "stdio.h"
void main()
{float i,a,b,c,d,e,f;
a=10*0.1;
b=10*0.075;
c=20*0.05;
d=20*0.03;
e=40*0.015;
scanf("%f\n",&i);
if(i<=10)f=i*0.1;
else if(i<=20)f=a+(i-10)*0.075;
else if(i<=40)f=a+b+(i-20)*0.05;
else if(i<=60)f=a+b+c+(i-40)*0.03;
else if(i<=100)f=a+b+c+d+(i-60)*0.015;
else f=a+b+c+d+e+(i-100)*0.01;
printf("%f",f);
}