Pascal's triangle/Puzzle: Difference between revisions
→{{header|Picat}}: Split into subsections
(→{{header|Picat}}: Split into subsections) |
|||
Line 2,230:
Below are three different approaches using constraint modelling (cp solver).
===Using lists to represent the triangle===
{{trans|Prolog}}
<lang Picat>import cp.
Line 2,271 ⟶ 2,272:
[x = 5,y = 13,z = 8]</pre>
===Calculating the positions===
Here is a
<lang Picat>import cp.
Line 2,324 ⟶ 2,326:
<pre>[x = 5,y = 13,z = 8]</pre>
<lang Picat>import cp.
Line 2,361 ⟶ 2,363:
{{out}}
<pre>[x = 5,y = 13,z = 8]</pre>
=={{header|PicoLisp}}==
|