新手求助 老有错误啊
试着编写了程序 但是编译是老有一个错误,学得不精找不到错误在哪里,求指导。#include <stdio.h>
int main(void)
{ long int i;
long int bonus1,bonus2,bonus4,bonus6,bonus10,bonus;
scanf("%ld", &i);
bonus1 = 100000*0.1;
bonus2 = bonus1 + 100000*0.075;
bunus4 = bonus2 + 200000*0.05;
bonus6 = bonus4 + 200000*0.03;
bonus10 = bonus6 + 400000*0.015;
if(i<=100000)
bonus = i*0.1;
else if(100000< i <= 200000)
bonus = bonus1 + (i - 100000)*0.075;
else if(200000< i <= 400000)
bonus = bonus2 + (i - 200000)*0.05;
else if(400000< i <= 600000)
bonus = bonus4 + (i - 400000)*0.03;
else if(600000< i <= 1000000)
bonus = bonus6 + (i - 600000)*0.015;
else if(i>1000000)
bonus = bonus10 + (i - 1000000)*0.01;
printf("bonus = %d\n", bonus);
return 0;
}