The Value of edge is always 1. Pascal’s triangle arises naturally through the study of combinatorics. Description and working of above program. We've shown only the first eight rows, but the triangle extends downward forever. Pascal’s triangle is a pattern of triangle which is based on nCr.below is the pictorial representation of a pascal’s triangle. To build out this triangle, we need to take note of a few things. Again, the sum of 3rd row is 1+2+1 =4, and that of 2nd row is 1+1 =2, and so on. The idea is to calculate C(line, i) using C(line, i-1). It happens that, \[{n+1 \choose k} = {n \choose k-1} + {n \choose k} \label{bteq1}\]. So, the sum of 2nd row is 1+1= 2, and that of 1st is 1. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready. The loop structure should look like for(n=0; n