Skip to content

Commit

Permalink
Updated pattern.md
Browse files Browse the repository at this point in the history
  • Loading branch information
anushkaa-02 authored Oct 8, 2021
1 parent bc784b6 commit 7cbfd65
Showing 1 changed file with 5 additions and 29 deletions.
34 changes: 5 additions & 29 deletions C_CPP/Algorithmic Approaches/Pattern.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,13 @@
# Pattern in C 👨‍💻
Pattern programs are nothing but patterns consisting of numbers, alphabets or symbols in a particular form. These kinds of pattern programs can be solved easily using loop condition.
Pattern programs are patterns containing alphabets, numbers, special characters in symmetrical or asymmetrical form. These programs can be solved using loop condition.
## Example:💡
There are various patterns in C language like star pattern, number patterns, and character patterns. In this section, we are going to discuss only Number and Star patterns.
| Index | Types |
| ----------- | ----------- |
| 1. | Number Patterns |
| 2. | Star Patterns |



There are several patterns in C language like star pattern, number patterns, and character patterns. In this section, we are going to discuss only :
* Number Pattern
* Star Pattern
---

## 📌NUMBER PATTERNS📄
* ### Pattern 1 [Pascal Triangle]:
![pascal](https://user-images.githubusercontent.com/87390353/135294713-6f11bdb1-34ad-47ec-9a5c-3181528fe377.jpg)

### 🖊Code:
```
#include<stdio.h>
Expand All @@ -40,10 +33,8 @@ int main()
}
```
---

* ### Pattern 2:
![num2](https://user-images.githubusercontent.com/87390353/135296627-9c64d253-916a-4651-95f9-00311d8675c3.jpg)

### 🖊Code:
```
#include<stdio.h>
Expand All @@ -67,10 +58,8 @@ if(j>=5-i&&j<=3+i)
}
```
---

* ### Pattern 3:
![num3](https://user-images.githubusercontent.com/87390353/135321692-e385113a-ad45-43ea-8cce-c382d0b3f234.jpg)

### 🖊Code:
```
#include<stdio.h>
Expand All @@ -88,10 +77,8 @@ void main()
}
```
---

* ### Pattern 4:
![num4](https://user-images.githubusercontent.com/87390353/135322196-d67aacef-bcd9-4b3e-8f89-51850ec04251.jpg)

### 🖊Code:
```
#include<stdio.h>
Expand All @@ -111,13 +98,10 @@ void main()
printf("\n");
}
}
```
---

* ### Pattern 5:
![num5](https://user-images.githubusercontent.com/87390353/135322532-d08b19db-f807-4d91-bbd3-38a6ced676b8.jpg)

### 🖊Code:
```
#include<stdio.h>
Expand All @@ -141,12 +125,10 @@ if(j>=5-i&&j<=3+i)
```
---
---

---
## 📌STAR PATTERNS📄
* ### Pattern 1:
![pattern_5](https://user-images.githubusercontent.com/87390353/135323734-c5f9b102-a837-4181-a9ee-6414475cfdbf.jpg)

### 🖊Code:
```
#include<stdio.h>
Expand All @@ -162,12 +144,10 @@ void main()
printf("\n");
}
}
```
---
* ### Pattern 2:
![pattern_4](https://user-images.githubusercontent.com/87390353/135324071-67c4495f-d85b-443c-bbb4-9c64fc86bfb4.jpg)

### 🖊Code:
```
#include<stdio.h>
Expand All @@ -193,7 +173,6 @@ void main()
---
* ### Pattern 3:
![pattern_3](https://user-images.githubusercontent.com/87390353/135325654-645df4a3-4b7f-4100-920a-fd74f7b30a6a.jpg)

### 🖊Code:
```
#include<stdio.h>
Expand All @@ -216,7 +195,6 @@ void main()
---
* ### Pattern 4:
![pattern_2](https://user-images.githubusercontent.com/87390353/135326627-5d91cd14-1719-4d20-a148-d71e2b3522c5.jpg)

## 🖊Code:
```
#include<stdio.h>
Expand All @@ -240,7 +218,6 @@ else
---
* ### Pattern 5:
![pattern_1](https://user-images.githubusercontent.com/87390353/135326959-c05ef3d9-7772-427d-a76d-21c686b628ba.jpg)

### 🖊Code:
```
#include<stdio.h>
Expand All @@ -260,4 +237,3 @@ else
}
```
## Happy Learning😊✨

0 comments on commit 7cbfd65

Please sign in to comment.