Pascal Triangle in C

Pascal Triangle Program in C

Here, you will learn about the pascal triangle and get the program code to create a Pascal Triangle in C programming language.

Pascal Triangle in C

 

What is Pascal Triangle?

Pascal’s Triangle is an arrangement of numbers in triangular foam, in which the numbers in each row are the coefficients in the expansion of (x+1)^n, where n is the row number, beginning with n=0.

The first row is n=0 and consists of the number 1. Each number in a row is the sum of right above two numbers.

Pascal Triangle Formula in C

Pascal triangle formula in c for nth row is given below:

C(n,k) = n! / (k! *(n-k)!)

in which nth is the rows and kth is the element.

Pascal Triangle in C program using For Loop

Output

pascal triangle output

 

 

 

Check out our other C programming Examples

 

 

 

 

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top