Welcome to the ⭐ Pattern repository! This repository contains various star patterns implemented in c++ programming languages. These patterns are commonly used in coding practice and interviews to demonstrate understanding of loops.
- Half Pyramid
*
* *
* * *
* * * *
* * * * *
- Full Pyramid
*
***
*****
*******
*********
- Inverted Pyramid
*********
*******
*****
***
*
- Diamond Shape
*
***
*****
*******
*********
*******
*****
***
*
- Right Angle Triangle
*
**
***
****
*****
- Left Angle Triangle
*
* *
* * *
* * * *
* * * * *
code:
int main()
{
for(int i=1;i<=5;i++)
{
for(int j=1;j<=5;j++)
{
if(j<=i)
{
cout<<"⭐";
}
else
{
cout<<" ";
}
}
cout<<endl;
}
}
⭐
⭐⭐
⭐⭐⭐
⭐⭐⭐⭐
⭐⭐⭐⭐⭐