diff --git a/modules/20-arithmetics/40-priority/en/EXERCISE.md b/modules/20-arithmetics/40-priority/en/EXERCISE.md index 965d5564..81939bc1 100644 --- a/modules/20-arithmetics/40-priority/en/EXERCISE.md +++ b/modules/20-arithmetics/40-priority/en/EXERCISE.md @@ -3,6 +3,7 @@ You and 4 friends (5 people in total) ordered 2 pizzas at 300 rubles each and 4 Write a one-line program with `console.log()`, placing parentheses so that the total amount is calculated first and then divided among everyone: ```text -without parentheses: 2 * 300 + 4 * 50 / 5 = 640 ← incorrect -with parentheses: (2 * 300 + 4 * 50) / 5 = 160 ← correct +2 * 300 + 4 * 50 / 5 = 640 ← without parentheses the division applies only to the drinks ``` + +Expected output: `160`. diff --git a/modules/20-arithmetics/40-priority/es/EXERCISE.md b/modules/20-arithmetics/40-priority/es/EXERCISE.md index 8b90fa45..ad898854 100644 --- a/modules/20-arithmetics/40-priority/es/EXERCISE.md +++ b/modules/20-arithmetics/40-priority/es/EXERCISE.md @@ -3,6 +3,7 @@ Tú y 4 amigos (5 personas en total) pidieron 2 pizzas a 300 rublos cada una y 4 Escribe un programa de una sola línea con `console.log()`, colocando los paréntesis de manera que primero se calcule el importe total y luego se divida entre todos: ```text -sin paréntesis: 2 * 300 + 4 * 50 / 5 = 640 ← incorrecto -con paréntesis: (2 * 300 + 4 * 50) / 5 = 160 ← correcto +2 * 300 + 4 * 50 / 5 = 640 ← sin paréntesis la división se aplica solo a las bebidas ``` + +Salida esperada: `160`. diff --git a/modules/20-arithmetics/40-priority/ru/EXERCISE.md b/modules/20-arithmetics/40-priority/ru/EXERCISE.md index 9d7e0109..9d479f9d 100644 --- a/modules/20-arithmetics/40-priority/ru/EXERCISE.md +++ b/modules/20-arithmetics/40-priority/ru/EXERCISE.md @@ -3,6 +3,7 @@ Запишите программу из одной строки с `console.log()`, расставив скобки так, чтобы сначала посчиталась общая сумма, а затем делилась на всех: ```text -без скобок: 2 * 300 + 4 * 50 / 5 = 640 ← неверно -со скобками: (2 * 300 + 4 * 50) / 5 = 160 ← верно +2 * 300 + 4 * 50 / 5 = 640 ← без скобок деление применяется только к напиткам ``` + +Ожидаемый вывод: `160`.