Q: Write a program to make pascal triangle ?
Pascal Triangle :Pascal's Triangle is more than just a big triangle of numbers. There are two major areas where Pascal's Triangle is used, in Algebra and in Probability / Combinatorics.
- At the top center rach number will be “1.”
- On the next row write two 1’s, forming a triangle.
- On each next row start and end with 1’s and compute each interior term by adding the two numbers above it.
public class pascal
static void sop(String ar)
public static void main(String args)
Scanner sc=new Scanner(System.in);
sop("Enter triangle size");
System.out.print(number +" ");