简单的利润问题
程序代码:
#include<stdio.h> main() { float profit,commision; printf("请输入您这一个月的利润\n"); scanf("%f\n",&profit); if(profit<=10) { commision=profit*0.1; } else if(profit<=20) { commision=1+(profit-10)*0.075; } else if(profit<=40) { commision=1.75+(profit-20)*0.05; } else if(profit<=60) { commision=2.75+(profit-40)*0.03; } else if(profit<=100) { commision=3.35+(profit-60)*0.015; } else if(profit>100) { commision=3.95+(profit-100)*0.01; } else { printf("您的输入有误,请重先输入\n"); } printf("%f\n",commision); } 那里错了。求解