C#: Display by Pascal's triangle
Write a C# Sharp program to display Pascal's triangle.
Construction of Pascal's Triangle:
As shown in Pascal's triangle, each element is equal to the sum of the two numbers immediately above it.

Sample Solution:-
C# Sharp Code:
Sample Output:
Display the Pascal's triangle: -------------------------------- Input number of rows: 8 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1 1 6 15 20 15 6 1 1 7 21 35 35 21 7 1
Flowchart:

C# Sharp Code Editor:
Contribute your code and comments through Disqus.
Previous: Write a C# Sharp Program to determine whether a given number is prime or not.
Next: Write a program in C# Sharp to find the prime numbers within a range of numbers.
What is the difficulty level of this exercise?
Test your Programming skills with w3resource's quiz.