當前位置:編程學習大全網 - 電腦編程 - java 打印圖形

java 打印圖形

public static void grid() {

for(int j=0; j<25; j++){

?if(j%4==0){

?for(int i=0; i<65; i++){

?System.out.print("*");

?}

?}else{

?for(int i=0; i<65; i++){

?if(i%8==0){

?System.out.print("*");

?}else{

?System.out.print(" ");

?}

?}

?}

?System.out.print("\n");

}

}

  • 上一篇:五年級孩子編程送什麽禮物
  • 下一篇:從泉州國厲學校到深滬怎麽坐公交車去
  • copyright 2024編程學習大全網