https://github.com/mounishvatti/patterns_in_cpp
This repository consists of various patterns solved using C++, solving patterns helps us in understanding looping concepts, with the help of patterns you will be thorough with loops & nested loops. Happy Coding 🚀
https://github.com/mounishvatti/patterns_in_cpp
loops-and-patterns nested-loops
Last synced: 4 months ago
JSON representation
This repository consists of various patterns solved using C++, solving patterns helps us in understanding looping concepts, with the help of patterns you will be thorough with loops & nested loops. Happy Coding 🚀
- Host: GitHub
- URL: https://github.com/mounishvatti/patterns_in_cpp
- Owner: mounishvatti
- Created: 2023-12-16T16:51:19.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-10T17:13:44.000Z (over 1 year ago)
- Last Synced: 2025-01-15T20:20:40.467Z (5 months ago)
- Topics: loops-and-patterns, nested-loops
- Language: C++
- Homepage:
- Size: 30.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This repository consists of various patterns solved using C++.
Solving patterns helps us in understanding looping concepts in any programming language.
With the help of patterns you will be thorough with loops & nested loops.
Note: Before solving any pattern question follow these 4 steps:
1) For the outer loop, count the no. of lines i.e rows.
2) For the inner loop, focus on the columns & connect them somehow to the rows.
3) Print them inside the inner for loop
4) Observe symmetry (optional for some patterns)## Happy Coding 🚀
```
Pattern - 1* * * *
* * * *
* * * *
* * * *
``````
Pattern - 2*
* *
* * *
* * * *
``````
Pattern - 31
1 2
1 2 3
``````
Pattern - 41
2 2
3 3 3
``````
Pattern - 5* * * *
* * *
* *
*
``````
Pattern - 61 2 3 4 5
1 2 3 4
1 2 3
1 2
1
``````
Pattern - 7*
***
*****
*******
*********
``````
Pattern - 8*****
***
*
``````
Pattern - 9*
***
*****
*****
***
*
``````
Pattern - 10*
**
***
**
*
``````
Pattern - 111
0 1
1 0 1
0 1 0 1
1 0 1 0 1
``````
Pattern - 121 1
12 21
123 321
12344321
``````
Pattern - 131
2 3
4 5 6
7 8 9 10
``````
Pattern - 14A
A B
A B C
A B C D
``````
Pattern - 15A
B B
C C C
D D D D
``````
Pattern - 16A
B C
D E F
G H I J
``````
Pattern - 17A B C D
A B C
A B
A
``````
Pattern - 18A A A A
B B B
C C
D
``````
Pattern - 19D D D D
C C C
B B
A
``````
Pattern - 20A
ABA
ABCBA
ABCDCBA
``````
Pattern - 21E
E D
E D C
E D C B
E D C B A
``````
Pattern - 22E
D E
C D E
B C D E
A B C D E
``````
Pattern - 23**********
**** ****
*** ***
** **
* *
* *
** **
*** ***
**** ****
**********
``````
Pattern - 24* *
** **
*** ***
**** ****
**********
**** ****
*** ***
** **
* *
``````
Pattern - 25****
* *
* *
****
``````
Pattern - 265 5 5 5 5 5 5 5 5
5 4 4 4 4 4 4 4 5
5 4 3 3 3 3 3 4 5
5 4 3 2 2 2 3 4 5
5 4 3 2 1 2 3 4 5
5 4 3 2 2 2 3 4 5
5 4 3 3 3 3 3 4 5
5 4 4 4 4 4 4 4 5
5 5 5 5 5 5 5 5 5
```