Egyptian fractions eaiser fixed by smkt J: ??? What_does_mean?

main(a,b,C,F){double V;while(scanf("%d/%d",&a,&b)>1){V=(float)a/b;printf("%d/%d =",a,b);F=1;for(C=1;C<2000;C++)(float)1/C<V?F?0:printf(" +"),C==786|C==1016|C==1121?C--:0,printf(" 1/%u",C),V-=(float)1/C,F=0:0;puts("");}}

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

download

return to the top page