X by Roy van Rijn

class h{public static void main(String[]a)throws Exception{int w,x=0;while((w=System.in.read())>13)x=x*10+w-48;w=x;for(;x-->0;){String e="";for(int y=0;y++<((w-x)>(x+1)?(w-x):(x+1));)e+=(x+1==y||w-x==y)?"X":" ";System.out.println(e);}}}

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

download

return to the top page