Question
Write a Java Program to Print Star Pascal’s Triangle
Answer :
Word Count : 197
________ ____ _________ __________ ________ _____.
_______ _____ _____ ___ ___ __________ _________ ____ ________ ______ _________ ________.
________ ____ _______ ______ ___ _________ _________ _______ _______.
________ ___ _________ ____ ___ _____ _______ _______ ___ ________ ________ _______.
__________ _____ _________ ____ ________ __________.
________ _________ ___ _____ ____ ___.
______ _____ __________ ______ ________ _________ ___.
________ _________ _____ ___ ________ ___ _______ _________ ________ ____ ________ ___.
_____ _______ _______ _____ _________ __________ ____ _____ __________ ____ _______.
________ _____ ________ ________ _____.
_______ ___ ___ ____ ___ ______ ____ ____ _____ ______ _______.
_____ ________ _____ ______ ____ ______ ___ ______ ________ _______ _____.
_________ ________ _____ _________ _______ ____ _________ ________.
____ ___ ___ ______ ________.
_____ ________ _________ ______ _______.
______ ____ _____ _______.
Skip in 10
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();
for (int i = 0; i < numRows; i++) {
_______ _____ _____ ___ ___ __________ _________ ____ ________ ______ _________ ________.
________ ____ _______ ______ ___ _________ _________ _______ _______.
________ ___ _________ ____ ___ _____ _______ _______ ___ ________ ________ _______.
__________ _____ _________ ____ ________ __________.
________ _________ ___ _____ ____ ___.
______ _____ __________ ______ ________ _________ ___.
________ _________ _____ ___ ________ ___ _______ _________ ________ ____ ________ ___.
_____ _______ _______ _____ _________ __________ ____ _____ __________ ____ _______.
________ _____ ________ ________ _____.
_______ ___ ___ ____ ___ ______ ____ ____ _____ ______ _______.
_____ ________ _____ ______ ____ ______ ___ ______ ________ _______ _____.
_________ ________ _____ _________ _______ ____ _________ ________.
____ ___ ___ ______ ________.
_____ ________ _________ ______ _______.
______ ____ _____ _______.
IGNOU ACADEMY
Your IGNOU journey, made easier.
- Solved Assignments
- Study Notes
- Guess Papers
- Question Papers
Continue Reading — It's Free
Sign in with Google to unlock more of this answer.
✓ Free access
✓ Unlock up to 60% of the answer
✓ No payment required
✓ Unlock up to 60% of the answer
✓ No payment required
Quick Google sign-in. No separate registration form.