Solve equations with substitution method: Difference between revisions

→‎{{header|Wren}}: Avoid mutating the second list.
(Added Wren)
(→‎{{header|Wren}}: Avoid mutating the second list.)
Line 57:
=={{header|Wren}}==
<lang ecmascript>var solve = Fn.new { |e1, e2|
e2 = e2.toList
for (i in 1..2) e2[i] = e2[i] * e1[0] / e2[0]
var y = (e2[2] - e1[2]) / (e2[1] - e1[1])
9,485

edits