标题:新手编程过程中的一个问题,求教
只看楼主
babylong5820
Rank: 1
等 级:新手上路
帖 子:7
专家分:0
注 册:2007-10-26
得分:0 
哇..我也是新人,学习学习.
2007-10-31 21:20
为你呼吸
Rank: 1
等 级:新手上路
帖 子:10
专家分:0
注 册:2007-10-29
得分:0 

//帮你改过了,自己看,这么粗心!!!!
#include<stdio.h>
main()
{float salory=500;
long profit;
printf("input profit\n");
scanf("%d",&profit);
if(profit<=1000) {salory+=salory;}
else if((profit>1000)&&(profit<=2000)) {salory+=profit*0.1;}
else if((profit<2000)&&(profit<=5000)) {salory+=profit*0.15;}
else if((profit<5000)&&(profit<=10000)) {salory+=profit*0.20;}
else if(profit>10000) {salory+=profit*0.25;}
printf("salary=%f\n",salory);
}

2007-10-31 23:19



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




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

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