project help!
how to make shape like this? (using "while")
* *
** **
*** ***
**** ****
***** *****
very please, i need help immediately...
i can make only one triangle(using "for"), but now i'm gonna make two triangles using "while"....
------------------------------
and this is my triangle(using "for"),, but this is only one shape
#include <iostream.h>
#include <conio.h>
void main()
{
int n,i;
cout<<"enter digit :";
cin>>n;
for(int i=0;i<n;i++)
{
for(int j=n;j>i;j--)
cout<<" ";
for(int k=0;k<i;k++)
cout<<" *";
cout<<"\n";
}
getch();
}
---------------
so i need your help to make 2 shape