write a program to print a star
*
**
***
****
****
using for next statement
#include<iostream>
using namespace std;
int main()
{
int i=0,j=0;
do
{
do
{
cout<<"*";
j=j+1;
}while(j<=i);
j=0;
cout<<"\n";
i=i+1;
}while(i<5);
}
Comments
Leave a comment