main(){float x,y;scanf("%f",&x);while(x>.5)y=modff(x,&x),x+=y>.6?1:y>.3?.5:0,printf("%.1f\n",x),x/=2;}
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page