题解 | 计算商品打折结算金额
#include <iostream>
#include <iomanip>
using namespace std;
int main() {
double price;
cin >> price;
// write your code here.......
float q=price>5000?0.6:(price>=2000?0.7:(price>=500?0.8:(price>=100?0.9:1)));
cout << setiosflags(ios::fixed) << setprecision(1) << price*q << endl;
return 0;
}

