-2

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 :)

Edited by Reverend Jim: Fixed formatting

Votes + Comments
When would you learn, use code tags !!!
2
Contributors
1
Reply
2
Views
8 Years
Discussion Span
Last Post by jonsca
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.