Pascal Triangle in Java

Here you will learn about pascal triangle in java with a program example.

What is Pascal’s Triangle?

It is a triangular array of the binomial coefficients. It is a number pattern which starts with 1 at top and then placing numbers below it in triangular pattern.

Each number is obtained by adding two numbers above it. Take below example, here 4 is obtained by adding 1 and 3 above it.

Below I have shared the java program to print pascal triangle. Each term in the pattern is obtained by using combination formula given below.

Combination Formula

Program for Pascal Triangle in Java

Output

Pascal Triangle in Java

Comment below if you have any doubts related to above program.

Leave a Reply

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