Number Patterns in C

C PROGRAMS ON NUMBER PATTERNS

Triangle Number Patterns

C-program for triangle number pattern 1
1
2 2
3 3 3
4 4 4 4
5 5 5 5 5
C-program for triangle number pattern 3
5
4 4
3 3 3
2 2 2 2
1 1 1 1 1
C-program for triangle number pattern 5
1
1 2
1 2 3
1 2 3 4
1 2 3 4 5
C-program for triangle number pattern 7
1
2 1
3 2 1
4 3 2 1
5 4 3 2 1

C-program for triangle number pattern 9
1
2 3
3 4 5
4 5 6 7
5 6 7 8 9

C-program for triangle number pattern 11
1 2 3 4 5
2 3 4 5
3 4 5
4 5
5
C-program for triangle number pattern 13
5
5 4
5 4 3
5 4 3 2
5 4 3 2 1
C-program for triangle number pattern 15
1
1 2 3
1 2 3 4 5
1 2 3 4 5 6 7
1 2 3 4 5 6 7 8 9
C-program for triangle number pattern 17
1
2 6
3 7 10
4 8 11 13
5 9 12 14 15
C-program for triangle number pattern 19
        1 
      2 2
    3 3 3 
  4 4 4 4
5 5 5 5 5
C-program for pyramid/triangle number pattern 21
             1
           2 1 2
         3 2 1 2 3
       4 3 2 1 2 3 4
     5 4 3 2 1 2 3 4 5
   6 5 4 3 2 1 2 3 4 5 6
 7 6 5 4 3 2 1 2 3 4 5 6 7

C-program for triangle number pattern 23
1
3  2
4  5  6  
10 9  8  7
11 12 13 14 15

.

C-program for triangle number pattern 2
5 5 5 5 5
4 4 4 4
3 3 3
2 2
1
C-program for triangle number pattern 4
1 1 1 1 1
2 2 2 2
3 3 3
4 4
5
C-program for triangle number pattern 6
1 2 3 4 5
1 2 3 4
1 2 3
1 2
1
C-program for triangle number pattern 8
5 4 3 2 1
4 3 2 1
3 2 1
2 1
1

C-program for triangle number pattern 10
5 6 7 8 9
4 5 6 7
3 4 5
2 3
1

C-program for triangle number pattern 12
5
4 5
3 4 5
2 3 4 5
1 2 3 4 5
C-program for triangle number pattern 14
5 4 3 2 1
5 4 3 2
5 4 3
5 4
5
C-program for Floyd's triangle/number pattern 16
1
2   3
4   5   6
7   8   9   10
11  12 13  14  15
C-program for triangle number pattern 18/0,1
1
0 0
1 1 1
0 0 0 0
1 1 1 1 1
C-program for Pascal's triangle/number pattern 20
        1
       1 1
      1 2 1
     1 3 3 1
    1 4 6 4 1
C-program for pyramid/triangle number pattern 22
            1
          1 2 1
        1 2 3 2 1
      1 2 3 4 3 2 1
    1 2 3 4 5 4 3 2 1
  1 2 3 4 5 6 5 4 3 2 1
1 2 3 4 5 6 7 6 5 4 3 2 1
C-program for triangle number pattern 24
1
2  3
4  5  6  
10 9  8  7
15 14 13 12 11

Diamond Number Patterns

C-program for diamond number pattern 1
1 
1 2 
1 2 3 
1 2 3 4 
1 2 3 4 5 
1 2 3 4 5 6 
1 2 3 4 5 6 7 
1 2 3 4 5 6 
1 2 3 4 5 
1 2 3 4 
1 2 3 
1 2 
1

 

Share Me!
  •  
  •  
  •  
  •  
  •  
  •