-1

Can this be written in a pseudococe as well the numbers are like this 8 7 6

5 4 3

2 1 0

  • 1
    Welcome to Stack Overflow, please read [how to ask a question](https://stackoverflow.com/help/how-to-ask). I think you need to add some clarity to your question. Do you want to loop through every row in a 2-dimensional array and print all integers on a single row? – MarkusAnd Apr 29 '20 at 11:58
  • This question might help. https://stackoverflow.com/questions/2569279/how-to-flatten-2d-array-to-1d-array – user54321 Apr 29 '20 at 12:02
  • Sorry about that I am new.... Yeah I want to loop through every row and column in a two dimensional array and print all integers both row and column – Trevor Moses Apr 29 '20 at 14:33

1 Answers1

1
         int [][]data = {
                 {
                     8,7,6
                 },
                 {
                     5,4,3
                 },
                 {
                     2,1,0
                 }
         };

         for(int [] row: data) {
             for(int item: row) {
                 System.out.print(item + " ");
             }

             System.out.println("\n");
         }

Yuri
  • 23
  • 7