- 189 名前:デフォルトの名無しさん mailto:sage [2008/10/10(金) 00:44:22 ]
- >>184
#include <iostream> using namespace std; int main() { for (;;) { string name; int credit_standing, amount_owed, minimum_payment; cin >> name >> credit_standing >> amount_owed; if (cin.eof()) break; if (credit_standing > 6) minimum_payment = (amount_owed <= 20) ? amount_owed : (amount_owed <= 100) ? 10 : 0.1 * amount_owed; else minimum_payment = amount_owed; cout << name << " with credit standing " << credit_standing << " must pay " << minimum_payment << endl; } return 0; }
|

|