C++ 超市打折计算程序
#include
int main() { int amount; cin >> amount;
if (amount <= 50) {
cout << amount << endl;
} else {
double discount = (amount - 50) * 0.8;
cout << 50 + discount << endl;
}
return 0;
}
原文地址: https://www.cveoy.top/t/topic/o69t 著作权归作者所有。请勿转载和采集!