hI 2 all, plz I need help in this program I need to draw a right-angle triangle, but empty from inside.
this what I did till now:

#include <iostream>
using namespace std;
void main ()
{
    int n;
    int i=1,j;
    cout<<"Enter the length";
    cin>>n;

     while(i<=n)
     { 
        j=1;
         while(j<=i)
         {   
             cout<<"*";

             j++;
         }

         cout<<endl;
         i++;
     }
}

thanks a lot :)

Agni commented: When would you learn, use code tags !!! +0

Hint: use your inner loop to control the spaces.

(also please do yourself a favor and read http://www.eskimo.com/~scs/readings/voidmain.960823.html ) about void main. main() should return an int. Make it a New Year's resolution)

(and of course code tags...)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.