Solve equations with substitution method: Difference between revisions
Solve equations with substitution method (view source)
Revision as of 19:52, 8 November 2021
, 2 years ago→{{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])
|