Write a Java Program to Print Star Pascal’s Triangle
import java.util.Scanner;
public class PascalTriangle {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.print("Enter the number of rows for Pascal's Triangle: ");
int numRows = scanner.nextInt();
________ ______ ___ __________ __________.
_____ _______ ________ ___ ____ ____ _____ ___ __________ _______ _________ _________.
_______ _______ ___ _______ _____ ________.
____ _____ _____ _____ ___ ___ _________ ___ ______.
___ ____ ______ ____ _________ __________ ________ ___.
_______ _________ ________ _________ _______ _____ ___ ___.
____ __________ ___ _________ ______ ________ ______ ______ ___ ____ ____.
______ ________ ________ _____ _________ __________ _____ ______ __________ _______ _________.
_________ _________ _____ ___ _________ ___ ________ _______ _________ _________ ___.
________ __________ _____ _____ ___ ______ _____ ________ ______ _____.
______ __________ ________ ___ _______ ____ ___ ____ ____ _________ __________ ____.
_________ __________ ______ ________ ___ _______ _____ ________ ___ _____.
_________ _______ _______ __________ _______ _______ _______ ________ __________ _____ _________.
_________ ___ __________ ______ ____ ____ ____ _______ __________ _________ _______.
_____ _______ _______ __________ ___.
_____ ______ ___ ________ ____ ______ ________ ___.
Get Full Answer on WhatsApp