13
Jun

nth Line of Pascal’s Triangle

Question:

Write a program to print the nth line of the Pascal’s Triangle

Program:

Explanation:

Pascal’s triangle is a triangle where each number is equal to the sum of the one or two numbers above it:

Output: