CPP
cpp
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
// Progarmer: Joker (Nasario)
// Progarm action:
// give Pascal Triangle to Nth row - 1
// w/o using Arrays
#include <iostream>
using namespace std;
long long int fac(long long int x);
//calculate factorial x
long long int xCy(long long int x, long long int y);
// returns value of x choose y
long long int row(long long int x);
// print Pascal Triangle row x
int main() {
long long int N;
cin >> N;
for (int i = 0; i <= N-1; i++)
row(i);
return 0;
}
long long int row(long long int x){
for (long long int i = 0; i <= x; i++){
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run