How to draw a rectangle for c++ with loops?
<p>So i have this code which makes a box, but want to make the corners +, the lengths |, and the widths - .  Also want to input a number so you can draw them like cout&lt;&lt;"enter the length number" etc... how would i do that? </p>

<p>Here is what i have to make a box:</p>

<pre><code>#include &lt;iostream.h&gt; 
#include &lt;string.h&gt; 

void main() 
{ 
  for(int z=1; z&lt;=79; z++) 
  { 
    cout &lt;&lt; ""; 
  } 

  cout &lt;&lt; endl; 

  for(int i=1; i&lt;=5; i++) 
  { 
    cout &lt;&lt; ""; 
    for(int j=1; j&lt;=77; j++) 
    { 
      cout &lt;&lt; " "; 
    } 

    cout &lt;&lt; "" &lt;&lt; endl; 
  } 

  for(int y=1; y&lt;=79; y++) 
  { 
    cout &lt;&lt; ""; 
  } 

  cout &lt;&lt; endl; 
}
</code></pre>
