我是个新手,请各位大牛看一下我这个系统存在的问题
# include "stdio.h"
# include "conio.h"
void hehe (int)
{
int x,choice ;
if(choice <= 100000)
{
x = 100000 * 0.1;;
}
else if(choice > 100000 && choice <200000)
{
x = (100000 * 0.1) + (choice - 100000)*0.075;
}
else if(choice >=200000 && choice <400000)
{
x = (100000 * 0.1) + (200000 - 100000)*0.075 + (choice - 200000)*0.05;
}
else if(choice >=400000 && choice <600000)
{
x = (100000 * 0.1) + (200000 - 100000)*0.075 + (400000 - 200000)*0.05 + (choice - 400000)*0.03;
}
else if(choice >=600000 && choice <1000000)
{
x = (100000 * 0.1) + (200000 - 100000)*0.075 + (400000 - 200000)*0.05 + (600000 - 400000)*0.03 +(choice - 600000)*0.015 ;
}
else
{
x = (100000 * 0.1) + (200000 - 100000)*0.075 + (400000 - 200000)*0.05 + (600000 - 400000)*0.03 +(1000000 - 600000)*0.015 + (choice -1000000)*0.01;
}
}
int main ()
{
int choice ;
int x;
printf("你输入公司单月的利润:");
scanf("%d",choice);
hehe(choice);
printf("%f\n",x);
return 0;
}