Question02 08
This commit is contained in:
@@ -18,9 +18,14 @@ public class PTra02_08 {
|
||||
// TODO 所持金から価格を引いた値を、買い物後の所持金として再代入してください。
|
||||
// ※消費税を考慮してください。税込み商品価格の端数は切り捨てとします。
|
||||
|
||||
//public static void remainingMoney() {
|
||||
int result = (int) (price * (1 + taxRate)); // +1 が必要
|
||||
money = money - result;
|
||||
// return money;
|
||||
|
||||
// }
|
||||
|
||||
// 残金の表示部分です。編集しないでください
|
||||
System.out.println("残金は" + money + "円です。");
|
||||
System.out.println("残金は"+money+"円です。");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user