C_Programs icon indicating copy to clipboard operation
C_Programs copied to clipboard

Pascal's Triangle

Open go4krishanu opened this issue 5 years ago • 0 comments
trafficstars

The numbers outside Pascal's triangle are all "0". These "0s" are very important for the triangular pattern to work to form a triangular array. The triangle starts with a number "1" above, and any new number added below the upper number "1" is just the sum of the two numbers above, except for the edge, which is all "1".

row 0 =1

row 1 = (0+1), (1+0) = 1, 1

row 2 = (0+1), (1+1), (1+0) = 1, 2, 1

row 3 = (0+1), (1+2), (2+1), (1+0) = 1, 3, 3, 1

row 4 = (0+1), (1+3), (3+3), (3+1), (1+0) = 1, 4, 6, 4, 1

row 5 = (0+1), (1+4), (4+6), (6+4), (4+1),(1+0) = 1, 5, 10, 10, 5, 1

row 6 = (0+1), (1+5), (5+10), (10+10), (10+5), (5+1), (1+0) = 1, 6, 15, 20, 15, 6, 1

go4krishanu avatar Oct 17 '20 16:10 go4krishanu