标题:新手编程过程中的一个问题,求教
取消只看楼主
misschen
Rank: 1
等 级:新手上路
帖 子:9
专家分:0
注 册:2007-10-17
 问题点数:0 回复次数:2 
新手编程过程中的一个问题,求教
main()
{float salory=500;
long profit;
printf("input profit\n");
scanf("%1d",&profit);
if(profit<=1000) {salory+=salory;}
if((profit>1000)&&(profit<=2000)) {salory+=profit*0.1;}
if((profit<2000)&&(profit<=5000)) {salory+=profit*0.15;}
if((profit<5000)&&(profit<=10000)) {salory+=profit*0.20;}
if(profit>10000) {salory+=profit*0.25;}
printf("salary=%f\n",salory);
}
 员工底薪为500,利润<=1000,没有提成,1000<利润<=2000提成10%,2000<利润<=5000,提成15%,5000<利润<=10000,提成20%,利润<10000提成25%
麻烦高手看看错在哪了???
2007-10-30 21:18
misschen
Rank: 1
等 级:新手上路
帖 子:9
专家分:0
注 册:2007-10-17
得分:0 
好象不对
2007-10-30 22:12
misschen
Rank: 1
等 级:新手上路
帖 子:9
专家分:0
注 册:2007-10-17
得分:0 
还是不对啊!!1
2007-10-31 12:12



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-182102-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.245731 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved