Cancel fractions by *yuko* division.working-storage section.
1 i pic 9(9).
1 j pic 9(9).
1 k pic 9(9).
1 s pic x(99).
procedure division.a.accept s
unstring s delimited"/"into i j
move 0 to k.b.add 1 to k
if 0<function mod(k*i,j)go b.compute j=k*i/j
display j(9- function log10(j):)no advancing
if k>1 display"/"k(9- function log10(k):)else
display"".if j<>504 go a.display"626/207".

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


return to the top page