public class CircleTry {
public static void main(String[] args) {
for(int a=1;a<6;a++){
System.out.println("第"+a+"行:");
for(int b =1;b<5;b++){
System.out.print("第"+b+"列");
for(int c=1;c<4;c++){
if(c==2){
System.out.print("c==2");
continue;
}
System.out.print("*");
}
System.out.println();
}
System.out.println();
}
}
}
运行结果:
第1行:
第1列*c==2*
第2列*c==2*
第3列*c==2*
第4列*c==2*
第2行:
第1列*c==2*
第2列*c==2*
第3列*c==2*
第4列*c==2*
第3行:
第1列*c==2*
第2列*c==2*
第3列*c==2*
第4列*c==2*
第4行:
第1列*c==2*
第2列*c==2*
第3列*c==2*
第4列*c==2*
第5行:
第1列*c==2*
第2列*c==2*
第3列*c==2*
第4列*c==2*
Process finished with exit code 0