Cancel fractions by murky-satyr

File standardInput readLines map(split("/")map(asNumber)reduce(n,d,a:=n;b:=d
while(0<b=a%a=b,1)writeln(n/a,if(d>a,"/".. d/a,""))))

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

download

return to the top page