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.
- Right Half Pyramid
*
* *
* * *
* * * *
* * * * *
- Triangle Star Pattern
*
***
*****
*******
*********
- Inverted Triangle Star Pattern
*********
*******
*****
***
*
- Diamond Shape
*
***
*****
*******
*********
*******
*****
***
*
- Left Half Pyramid
*
* *
* * *
* * * *
* * * * *
- Square Fill Pattern
* * * *
* * * *
* * * *
* * * *
code:
int main()
int n ;
cin>>n;
{
for(int i=1;i<=5;i++)
{
for(int j=1;j<=5;j++)
{
if(j<=i)
{
cout<<"⭐";
}
else
{
cout<<" ";
}
}
cout<<endl;
}
}
⭐
⭐⭐
⭐⭐⭐
⭐⭐⭐⭐
⭐⭐⭐⭐⭐