if (shape.equals("diagonal")){
for (int row = 0; row <= size; row ++){
for (int col = 0 ; col < size; col ++ ){
if ( col % 4 == 0 ){
System.out.print("*");
} else {
System.out.print("$");
}
}
System.out.println();
}
}
*$$$*$$$*$$$*$$$*
$*$$$*$$$*$$$*$$$
$$*$$$*$$$*$$$*$$
same as it go down
我的目标是打印上面的代码并继续直到 17 x 17 输出被创建