Ive been told to do a program which outputs the following:
*
**
***
****
*****
I know it involves using three loops that look like this:
for(int i=1;i<=5;i++)
{
for(int j=i;j<=5;j++)
{
cout<<" ";
}
for(???????)
{
cout<<*;
}
cout<<endl;
}
can someone please tell me if im close, and if so what this third loop needs to contain? ive been trying to do it for a while now, and no matter what i put in that third loop it always runs infinitely.
thanks~