59
1
using System;
2
3
public class Program
4
{
5
public static void Main()
6
{
7
//Please change the parameter to a number less than 10
8
PascalTriangle(1);
9
}
10
11
// factorial
12
static int fact(int n)
13
{
14
int x = 1;
15
while (n > 1)
16
{
17
x = x * n;
18
n = n - 1;
19
}
20
21
return x;
22
}
23
24
// combinations
Cached Result