Any ways to make this shorter?
<p>The output is supposed to be in this fashion</p>

<pre><code>I
IN
IND
INDI
INDIA
INDIA
INDI
IND
IN
I
</code></pre>

<p>I was wondering if there is anyway to make my program shorter.</p>

<p>Maybe use 2 <code>while</code> loops or 2 <code>for</code> loops instead of 4.</p>

<pre><code>#include&lt;iostream&gt;
#include&lt;conio.h&gt;
using namespace std;
void main()
{
    char a[]={'I','N','D','I','A'};
    int r,c;
    for(r=1;r&lt;=5;r++)
    {
        for(c=0;c&lt;r;c++)
            cout&lt;&lt;a[c]&lt;&lt;" ";
        cout&lt;&lt;endl;
    }

    for(r=5;r&gt;=0;r--)
    {
        for(c=0;c&lt;r;c++)
            cout&lt;&lt;a[c]&lt;&lt;" ";
        cout&lt;&lt;endl;
    }
    _getch();
}
</code></pre>
