大家帮我看看我的程序哪里错了,为什么当输入大于1000后,就不能正常运算了呢?
#include<stdio.h>
int main()
{
int porfit, sum;
printf("Please input porfit:");
scanf("%d",&porfit);
if (porfit<=1000)
printf("you will get:$%d\n",500);
else{
if(porfit>1000&&porfit<=2000)
printf("you will get:$%d\n",500+porfit*0.1);
else{
if(2000<porfit<=5000)
printf("you will ger:$%d\n",500+porfit*.15);
else{
if(5000<porfit<=10000)
printf("you will get:$%d\n",500+porfit*.2);
else{
if(porfit>=10000)
printf("you will get:$%d\n",500+porfit*.25);
} }}}
}