This C program accepts the number of rows from the user as input and then prints Pascal’s triangle with the number of rows provided.
Program: Pascal’s triangle in C
Output: Pascal’s triangle
Enter no. of rows: 6
1
1 1
1 2 1
1 3 3 1
1 4 6 4 1
1 5 10 10 5 1
Share your code in the comments to make learning easier for others.
Share this code on twitter.
Follow us on twitter.