title: Visual Studio: How to put spaces before the text in a for loop
body: <p>I need your help with this problem. What I am trying to do is create a rectangle within the given coordinates or spaces. Here's my code so far, what am I missing here? Please see sample input and output below.</p>
  
  <pre><code>Dim d As String = ""
  Dim s As String = ""
  Dim counter As Integer = 0
  
  For i = 1 To y
      s = s &amp; vbNewLine
  Next
  
  For row = 1 To height
      For col = 1 To width
           If x &lt;&gt; 0 Then
  
  
  
           Else
               d = d &amp; "X "
           End If
          Next
          d = d &amp; vbNewLine
      Next
  outputTBX.Text = s &amp; d
  </code></pre>
  
  <p>Here is my sample input, however, if you look at the sample output, there should be 2 spaces before the X's. Thank you in advance!</p>
  
  <p>Width: 4</p>
  
  <p>Height: 4</p>
  
  <p>X axis: 2</p>
  
  <p>Y axis: 2</p>
  
  <p><a href="https://i.stack.imgur.com/tNlQB.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tNlQB.jpg" alt="enter image description here"></a></p>