Pascal's triangle/Puzzle: Difference between revisions

Content added Content deleted
(→‎{{header|Java}}: fixed an HTML PRE closing tag that "ate" the 1st Julia solution.)
(added version numbers now that Julia has two solutions (one was previously "ate" by the Java entry).)
Line 1,528: Line 1,528:


=={{header|Julia}}==
=={{header|Julia}}==
===version one===
{{works with|Julia|0.6}}
{{works with|Julia|0.6}}
{{trans|Kotlin}}
{{trans|Kotlin}}

<lang julia>function pascal(a::Integer, b::Integer, mid::Integer, top::Integer)
<lang julia>function pascal(a::Integer, b::Integer, mid::Integer, top::Integer)
yd = round((top - 4 * (a + b)) / 7)
yd = round((top - 4 * (a + b)) / 7)
Line 1,549: Line 1,549:
<pre>Solution: x = 5, y = 13, z = 8.</pre>
<pre>Solution: x = 5, y = 13, z = 8.</pre>


===version two===
=={{header|Julia}}==
{{trans|Kotlin}}
{{trans|Kotlin}}
<lang julia>struct Solution
<lang julia>struct Solution