Reduce fractions FIXED by teebee(nu)

var a,x,y:word;c:char;begin repeat read(x,c,y);a:=1;while a*x mod y>0do inc(a);writeln(a*x div y,c,a)until 0>1end.

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

download

return to the top page