Pascal triangle

Please help what should be the logic of ,to print pascal triangle till N i unable to think

Hey Mayur, the values in pascal triangle are basically based on the binomial coefficient of that particular row and column(i.e nCr where n is row number and r is column number).
for eg.
14%20PM

in this picture you can see
for row 0 and column 0
0C0 =1
for row 1 and column 0
1C0 =1
1C1 =1

Similarly, you can calculate all the values using their row and column number.

Hope this helps you :slight_smile:

1 Like