08/10/10 00:59:43
>>184 なんだCだったか
#include <stdio.h>
int main() {
char name[32];
int credit_standing, amount_owed, minimum_payment;
while (scanf("%31s %d %d", name, &credit_standing, &amount_owed) == 3) {
if (credit_standing > 6)
minimum_payment = (amount_owed <= 20) ? amount_owed
: (amount_owed <= 100) ? 10
: 0.1 * amount_owed;
else
minimum_payment = amount_owed;
printf("%s with credit standing %d must pay %d\n",
name, credit_standing, minimum_payment);
}
return 0;
}