Cancel fractions by uru

var a,b,i:word;c:char;begin
repeat
read(a,c,b);i:=a;while a mod i+b mod i>0do dec(i);write(a div i,^j:i div b);if b>i then writeln(c,b div i)until 1=0end.

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

download

return to the top page