A C++ program to print the below pattern
*
**
***
****
*****
Code
#include <iostream>
using namespace std;
int main()
{
for(int i=1;i<=5;i++){ //1st loop holds count
for(int j=1;j<=i;j++){ //2nd loop print i stars
cout<<"*";
}
cout<<endl;
}
return 0;
}
Output
*
**
***
****
*****
Other Star Patterns:
*****
****
***
**
*
****
***
**
*
0 Comments