文章
3
粉丝
49
获赞
0
访问
1.7k
#include<bits/stdc++.h>
using namespace std;
int main(){
float n;
while(cin>>n){
if(n<1000){
cout<<"discount=1,pay="<<n<<endl;
}else if(1000<=n&&n<2000){
cout<<"discount=0.95,pay="<<n*0.95<<endl;
}else if(2000<=n&&n<3000){
cout<<"discount=0.9,pay="<<n*0.9<<endl;
}else if(3000<=n&&n<5000){
cout<<"discount=0.85,pay="<<n*0.85<<endl;
}else{
cout<<"discount=0.8,pay="<<n*0.8<<endl;
}
}
}
登录后发布评论
暂无评论,来抢沙发