C++ program: Printing a trapezoid using input redirection
<p>I'm trying to print a trapezoid, but for some reason it's either I keep getting a triangle, or the size of my trapezoid is wrong. Can someone please tell me what's wrong or what's missing? Your help is greatly appreciated. 
Is there a way I can input my own values for the top row/base, and the height? I input my height, and I don't get right height. </p>

<pre><code>for (i = 1; i &lt; trapeH; i++)
{
    for (k = spacesT-1; k &gt; 0; k--)
    {
        cout &lt;&lt; " ";
    }

    spacesT = spacesT - 1;

    for (j = 1; j &lt;= (2*i + 1); j++)
    {
        cout &lt;&lt; "*";
    }

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