Plot Circle by uru

class A{public static void main(String[]_)throws Exception{int r=Integer.valueOf(new java.io.BufferedReader(new java.io.InputStreamReader(System.in)).readLine());for(int y=-r;y<=r;y++){String s="";for(int x=-r;x<=r;x++)s=s+(x*x+y*y>r*r?" ":"*");System.out.println(s);}}}

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

download

return to the top page