public void puMap() {
for (int y = 0; y <= 2 * r; y += 2) {
long x = Math.round (r - Math.sqrt(2 * r * y - y * y));
double longLength = 2 * (r - x);
for (int i = 0; i <= x; i++) {
System.out.print(' ');
}
System.out.print('*');
for (int j = 0; j <= longLength; j++) {
System.out.print(' ');
}
System.out.println('*');
}
}
其解释这段代码,是打印空心圆的,但是里面代码不是很懂,求解释和注释代码,谢谢大神们