Skip to content

This repository showcases different star patterns created using C++. Star patterns are a great way to practice nested loops and improve your problem-solving skills in a fun and visually appealing way.

Notifications You must be signed in to change notification settings

ansiace/Star-Pattern

Repository files navigation

Star Pattern Programs

Welcome to the Star Pattern Programs repository! 🌟

This repository contains various star patterns implemented in c++ programming languages, May it includes some patterns of numbers instead of stars .These patterns are commonly used in coding practice and interviews to demonstrate understanding of loops.

Some of the following patterns included in this series:

  • Right Half Pyramid

Pattern:

  *
  * *
  * * *
  * * * *
  * * * * *
  • Triangle Star Pattern

    Pattern:

        *
       ***
      *****
     *******
    *********
  • Inverted Triangle Star Pattern

Pattern:

    *********
     *******
      *****
       ***
        *
  • Diamond Shape

Pattern:

        *
       ***
      *****
     *******
    *********
     *******
      *****
       ***
        *
  • Left Half Pyramid

Pattern:

        *
      * *
    * * * 
  * * * *
* * * * *
  • Square Fill Pattern

Pattern:

* * * *
* * * *
* * * *
* * * *

Star pattern programs in C++

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;
        
    }
    
}

output:

⭐⭐
⭐⭐⭐
⭐⭐⭐⭐
⭐⭐⭐⭐⭐

Explore the repository to find more!

📧 Contact

If you have any questions or suggestions, feel free to reach out via issues or email.


Happy Coding! 😊

About

This repository showcases different star patterns created using C++. Star patterns are a great way to practice nested loops and improve your problem-solving skills in a fun and visually appealing way.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages