Welcome to the ⭐ Pattern repository! This repository contains various star patterns implemented in c++/cpp programming languages. These patterns are commonly used in coding practice and interviews to demonstrate understanding of loops.
- Right Half Pyramid
*
* *
* * *
* * * *
* * * * *
- Triangle Star Pattern
*
***
*****
*******
*********
- Inverted Triangle Star Pattern
*********
*******
*****
***
*
- Diamond Shape
*
***
*****
*******
*********
*******
*****
***
*
- Left Half Pyramid
*
* *
* * *
* * * *
* * * * *
- Squre Fill Pattern
* * * *
* * * *
* * * *
* * * *
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;
}
}
⭐
⭐⭐
⭐⭐⭐
⭐⭐⭐⭐
⭐⭐⭐⭐⭐