title: NxN matrix using embedded for loops
body: <p>I am trying to create an NxN matrix using embedded for loops. I think I almost have it but I feel like I am missing something in the loops. The user is suppose to give me n and I generate the matrix based of that input.</p>
  
  <pre><code>public static void printMatrix( int n ){
  
  
  
      for ( int i = 1; i &lt; n; i++ ){
          System.out.println(" "+(int)(Math.random() + 0.5));
  
          for( int k = 1; k &lt; n+1; k++)
              System.out.print(" "+(int)(Math.random() + 0.5));
  
      }
  }
  </code></pre>