C/C++の宿題を片付けます 116代目
at TECH
191:デフォルトの名無しさん
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;
}
次ページ続きを表示1を表示最新レス表示スレッドの検索類似スレ一覧話題のニュースおまかせリスト▼オプションを表示暇つぶし2ch
4441日前に更新/366 KB
担当:undef