JAVA
java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Challenge by Ravinder Singh located here:
// https://www.sololearn.com/Discuss/822439/?ref=app
// [CHALLANGE] Pascal Triangle
// Input(number of rows) = 6
// output:
// 1
// 1 1
// 1 2 1
// 1 3 3 1
// 1 4 6 4 1
// 1 5 10 10 5 1
// Create a program which will make such triangle
// 1>Using Arrays
// 2>Without using Arrays
// Good Luck :)
// package pascal;
import java.util.Scanner;
// ********************* Pascal ********************
//
// This is the main class of my pascal package. It
// solves and displays Pascal Triangles with 1 to
// 10 lines as requested by the user. If the user's
// request is invalid, it defaults to 6. This
// calculates the columns value based on the previous
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run