Pascal's triangle has been studied around the world for hundreds of years. Not primarily because of its mystique but because a simple arrangement of numbers can produce some interesting patterns. Each row starts and ends with 1 but the values in each row are the sum of the two numbers above it. But that is one way you could think of it. Another way is looking at the edges (diagonals) and working your way in you can see such patterns as natural numbering, triangular numbering, tetrahedral and even pentatope numbers. Each row moving in is said to be the next highest order of triangle.

Try to create a PASCAL's Triangle when Input is given in no of rows

You can challenge your self by making it more generic

like replacing any other digit by 1 and starting at ending of rows