Problem Analysis:
The problem is to calculate the factorial of a given number and find out permutation and combination using the factorial calculated.
Code:
Outputs:
Enter a number(n) to calculate it’s factorial and r such n>r
5
2
5! = 120
ncr=10
npr=20