Solve equations with substitution method: Difference between revisions

Content added Content deleted
(Created Nim solution.)
m (→‎{{header|Wren}}: Changed to Wren S/H)
Line 714: Line 714:


=={{header|Wren}}==
=={{header|Wren}}==
<syntaxhighlight lang="ecmascript">var solve = Fn.new { |e1, e2|
<syntaxhighlight lang="wren">var solve = Fn.new { |e1, e2|
e2 = e2.toList
e2 = e2.toList
for (i in 1..2) e2[i] = e2[i] * e1[0] / e2[0]
for (i in 1..2) e2[i] = e2[i] * e1[0] / e2[0]