文章
81
粉丝
0
获赞
284
访问
11.5k
#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( n <= 2000){
cout<<"discount=0.95,pay="<<n*0.95<<endl;
}else if( n <= 3000){
cout<<"discount=0.9,pay="<<n*0.9<<endl;
}else if( n <= 5000){
cout<<"discount=0.85,pay="<<n*0.85<<endl;
}else{
cout<<"discount=0.8,pay="<<n*0.8<<endl;
}
}
return 0;
}
登录后发布评论
暂无评论,来抢沙发