Decimal Point Fixed by TokusiN

n;main(e,c)char*c;{for(;~scanf("%s%n%d ",c,&e,&n);){for(;c[--e]<49&&n;n--)c[e]=0;++e>n?printf("%.*s.%*s\n"+!n*5,e-n,c,0,e-n+c):printf("0.%0.*d%s\n",n-e,0,c);}}

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

To protect the system from spam, please input your favorite sport (hint: I believe its name must start with 'g', case insensitive)

download

return to the top page