Write a Java program called Pattern that prints an 8-by-8 checker box pattern using a For loop structure as follows:

# # # # # # # #
# # # # # # # #
# # # # # # # #
# # # # # # # #
# # # # # # # #
# # # # # # # #
# # # # # # # #
# # # # # # # #

Respuesta :

public class JavaApplication79 {

   

   public static void main(String[] args) {

       int count = 0;

       for(int i = 0; i < 64; i ++){

           if (count == 8){

               System.out.println("");

               count = 0;

           }

           System.out.print("#");

           count ++;

       }

   }

   

}

I hope this helps!