Make a C++ program using do while loops that will print this output:
*
**
***
****
*****
#include<iostream>
using namespace std;
int main()
{
int i=1;
do
{
int j=1;
do
{
cout<<"*";
j++;
}while(j<=i);
cout<<endl<<endl;
i++;
}while(i<=5);
}
Comments
Leave a comment