/Patterns

This repository features pattern programs in C, helping programmers strengthen their understanding of loops, nested loops, and control flow. Explore the code, modify it, and contribute to expand the collection of patterns. Let these programs enhance your skills and inspire your creativity. Happy coding!

Primary LanguageC

Patterns

This repository contains various pattern programs implemented in the C programming language. These patterns can be useful for understanding loops, nested loops, and controlling the flow of execution.

Table of Contents

Introduction

Pattern programs are a common exercise in programming that help enhance problem-solving and logical thinking skills. They involve printing various shapes, symbols, or numbers in a specific pattern using loops and conditional statements.

This repository serves as a collection of pattern programs implemented in the C programming language. Each program showcases a specific pattern and provides an opportunity to learn and practice different concepts, such as nested loops, conditional statements, and formatting output.

Patterns

  1. Pyramid Pattern

    Enter N = 5
    1
    1 2
    1 2 3
    1 2 3 4
    1 2 3 4 5
    
  2. Hollow Rectangle Pattern

    Enter rows and columns = 5 10
    **********
    *        *
    *        *
    *        *
    **********
    
  3. Diamond Pattern

    Enter N = 5
        *
       ***
      *****
     *******
    *********
     *******
      *****
       ***
        *
    
  4. Number Triangle Pattern

    Enter N = 5
        1
       2 2
      3 3 3
     4 4 4 4
    5 5 5 5 5
    
  5. Floyd's Triangle Pattern

    Enter rows = 4
    1
    2 3
    4 5 6
    7 8 9 10
    

Languages

The patterns in this repository are implemented in the C programming language.

Each pattern program is written in C and provides an opportunity to learn and practice different concepts, such as loops, nested loops, and formatting output. You can find the C code for each pattern in the respective folder.

Feel free to explore the different patterns and enhance your understanding of programming logic and control flow using C.

Each language has its own folder containing the pattern programs implemented in that specific language.

Contributing

Contributions to this repository are welcome. If you'd like to add more pattern programs in different programming languages or improve existing ones, please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your changes.
  3. Implement the pattern program(s) in the desired programming language.
  4. Add a code file and update the corresponding readme file with the output example(s).
  5. Commit your changes and push the branch to your forked repository.
  6. Open a pull request, providing a clear description of the changes you made.

Please ensure that your code follows the style and formatting conventions of the respective programming language.

License

This repository is licensed under the MIT License. Feel free to use, modify, and distribute the code for personal and educational purposes.