Anonymous user
Pascal's triangle/Puzzle: Difference between revisions
m
→{{header|REXX}}: changed whitespace.
No edit summary |
m (→{{header|REXX}}: changed whitespace.) |
||
Line 2,196:
=={{header|REXX}}==
<lang rexx>/*REXX program solves a (Pascal's) "Pyramid of Numbers" puzzle given four values. */
/* ╔══════════════════════════════════════════════════╗
╚══════════════════════════════════════════════════╝ */
do #=2;
if n\==0 then leave;
end /*#*/;
parse arg b d mid answer . /*obtain optional variables from the CL*/
if b=='' | b=="," then b= 11 /*Not specified? Then use the default.*/
Line 2,223:
do z=-big to big
if z \== y - x then iterate /*Z has to equal Y-X (Y= X+Z) */
if x+y*6+z==big then say right('x =', n) x right("y =",n) y right('z =',n) z
end /*z*/
end /*y*/
Line 2,229:
{{out|output|text= when using the default inputs:}}
<pre>
/* ╔══════════════════════════════════════════════════╗
╚══════════════════════════════════════════════════╝ */
</pre>
|