Yellowstone sequence: Difference between revisions

m
→‎{{header|REXX}}: added wording to the output sections.
mNo edit summary
m (→‎{{header|REXX}}: added wording to the output sections.)
Line 889:
/*──────────────────────────────────────────────────────────────────────────────────────*/
gcd: parse arg x,y; do until y==0; parse value x//y y with y x; end; return x</lang>
{{out|output|text=&nbsp; when using the default input: &nbsp; &nbsp; <tt> 30 </tt>}}
<pre>
1 2 3 4 9 8 15 14 5 6 25 12 35 16 7 10 21 20 27 22 39 11 13 33 26 45 28 51 32 17
Line 898:
<lang rexx>/*REXX program calculates any number of terms in the Yellowstone (permutation) sequence.*/
parse arg m . /*obtain optional argument from the CL.*/
if m=='' | m=="," then m= 10030 /*Not specified? Then use the default.*/
!.= 0 /*initialize an array of numbers(used).*/
# = 0 /*count of Yellowstone numbers in seq. */
Line 916:
/*──────────────────────────────────────────────────────────────────────────────────────*/
gcd: parse arg x,y; do until y==0; parse value x//y y with y x; end; return x</lang>
{{out|output|text=&nbsp; when using the default input: &nbsp; &nbsp; <tt> 100 </tt>}}
 
The terminal screen size has a height of 55 characters (including values), the plot is shown at three quarter scale.