Cancel fractions by pooq

for i=0to 999input""y$
a=val(y$)
b=val(mid$(y$,instr(y$,"/")+1))
c=a
d=b
while(d)t=mod(c,d)
c=d
d=t
wend
?a/c;
if b>c?"/",b/c;
?next

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

download

return to the top page