title: Pattern of HASH characters (#) with Java loop
body: <p>Hello i need a program that reads a number and then prints a square pattern of (#) hash. But each edge needs the same number of hashes</p>
  
  <p>eg</p>
  
  <p>enter a number: 5</p>
  
  <pre><code>#####
  #####
  #####
  #####
  #####
  </code></pre>
  
  <p>this is what i have so far</p>
  
  <pre><code>import console;
  
  print("write a number: ");
  int n = readInt();
  int nva=0;
  String i="#";
  
  while (nva&lt;n){
     print(i);
     nva=nva + 1;
  
     }
   println();
  </code></pre>