static long CC(int n , int r)
Console.WriteLine("cheak the number of n or r and try again");
return Fact(n) / (Fact(r) * Fact(n-r));
static long CP(int n , int r)
Console.WriteLine("cheak the number of n or r and try again");
return Fact(n) / Fact(n-r);
public static void Main()
Console.WriteLine("n = ");
int n = int.Parse(Console.ReadLine());
Console.WriteLine("r = ");
int r = int.Parse(Console.ReadLine());
Console.WriteLine("The C for ({0},{1}) is {2}", n , r , c);
Console.WriteLine("The P for ({0},{1}) is {2}", n , r , p);