Egyptian fraction by pooq

p:printf;thru 125 do(p(?t,"~a",a:rat(?read())),d:" =",while(a#0)do(p(?t,"~a 1/~a",d,c:ceiling(1/a)),a:a-1/c,d:" +"),newline());

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

download

return to the top page