hexagon 2nd fixed by primo

class
h{public
static
void
main(String[]_)throws
Exception{int
i,j,k,n=System.in.read()%8*6;String
s="/  \\__";s+=s+s;s+=s+s;for(i=n;;System.out.println(String.format("%"+(n-j-2)+"s",s.substring(k%6+j,n+k%6-j-2)))){k=Math.abs(i-=3);j=k-n/2+(i>0?1:0);j=j>0?j:0;}}}

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

download

return to the top page