回答編集履歴
1
訂正
answer
CHANGED
@@ -3,8 +3,8 @@
|
|
3
3
|
原因は、計算の順序です。
|
4
4
|
|
5
5
|
```js
|
6
|
-
let price_two_value = group_price_two.value;
|
7
|
-
|
6
|
+
let price_two_value = group_price_two.value; /* ←グループ2の一人当たり支払額 */
|
7
|
+
const price_three_value = group_price_three.value;
|
8
8
|
|
9
9
|
const payment = (payment_value - ((price_two_value /* ←グループ2の一人当たり支払額 */ * people_two_value) + (price_three_value * people_three_value))) / people;
|
10
10
|
const payment_cell = Math.ceil(payment/100)*100;
|