Jump to content

Fractran: Difference between revisions

m
→‎{{header|REXX}}: added whitespace in a couple of comparisons.
m (→‎{{header|REXX}}: added whitespace and changed some comments, used templates for the output sections.)
m (→‎{{header|REXX}}: added whitespace in a couple of comparisons.)
Line 2,778:
do j=1 for terms /*perform the DO loop for each term. */
do k=1 for # /* " " " " " " fraction*/
if N // d.k \== 0 then iterate /*Not an integer? Then ignore it. */
say right('term' j, 35) "──► " N /*display the Nth term with the N. */
N= N % d.k * n.k /*calculate next term (use %≡integer ÷)*/
Line 2,920:
do j=1 for abs(terms) /*perform DO loop once for each term. */
do k=1 for # /* " " " " " " fraction*/
if N // d.k \== 0 then iterate /*Not an integer? Then ignore it. */
if tell then say right('term' j, 35) "──► " N /*display Nth term and N.*/
else if !.N then say right('term' j,15) "──►" @.N q right(L,w)") " N
Cookies help us deliver our services. By using our services, you agree to our use of cookies.