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
/*[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 :)
*/
// 👉INSTRUCTIONS ::: ENTER A POSITIVE INTEGER ☺👍
import java.util.*;
public class GauravProgram
{
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
int n=0;
try{
n=sc.nextInt();}
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run