Long Division FIXED by Sisyphus

u=gets.to_i;puts"%#{z=2+k=$_.size}s
"*2%[u/9,'_'*k],"9 | #{u}",(6..z).map{|x|"%#{x}s
"*3%[$_[0,2],"- %2d"%(u%9*9),'__']},"%*s"%[z,u%9]

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