求解分段利润;但是输出的结果是错误的;求大神批改
#include "stdio.h"main()
{
int i,d1,d2,d3,d4,d5,d6;
printf("please input i:");
scanf("%d",&i);
switch(i/100000)
{
case 1:d1=i*0.1;printf("%d",d1);break;
case 2:d2=d1+(i-100000)*0.075;printf("%d",d2);break;
case 3:
case 4:d3=d2+(i-200000)*0.05;printf("%d",d3);break;
case 5:
case 6:d4=d3+(i-400000)*0.03;printf("%d",d4);break;
case 7:
case 8:
case 9:
case 10:d5=d4+(i-600000)*0.015;printf("%d",d5);break;
default:d6=d5+(i-1000000)*0.01;
printf("%d",d6);
}
}