Egyptian fraction by clock

<?for(;fscanf(STDIN,'%d/%d',$a,$b);$f=!print$f.~\xf5)for(print"$a/$b";$f.=" + 1/".$c=ceil($b/$a),$a=$a*$c-$b;$f[1]='=')$b*=$c;

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

download

return to the top page