Euclids orchard by *yuko*

program-id.y.data division.working-storage section.
1 i pic 999.
1 j pic 999.
1 n pic 99.
1.
2 s pic x(100) occurs 100.procedure division.accept s(1)move s(1)to n
move"t"to s(1).a.add 1 to i
move i to j.b.if j<n*10 add 1 to j
move s(i)(j- i:1)to s(i)(j:)s(j)(i:)go b.display s(i)(1:j)go a.

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page