Long Division by rotary-o

using C=System.Console;class M{static void Main(){for(int d=C.Read()%8,n=1-d*5%12,i=5,j=5;i-->n*4;)C.Write(i>n?i<0?""+d:" ":i<n?i>n*2?"_":i>n*3?i%n<0?"0":"\n9 | "+d:"\n{0,"+j+(j<5-n?"}0\n{1,"+(j-2)+"}{2,3}\n{3,"+j+++"}_":"}"):"\n  ___",d,'-',d*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