Write a C program to calculate the combination of n objects taken r at a time
Combination is a selection of objects from a group such that (unlike permutations) the order of selection does not matter. The number of combinations on n objects taken r at a time is given by the formula n!/(r!(n-r)!) = n(n-1)(n-2)...(n-r+1)/r!
Input : 5, 2
Output : 10
How to contribute
- Save the solution in `program/CalculateTheCombinationOfNObjectsTakenRAtATime.c` file
- Add `CalculateTheCombinationOfNObjectsTakenRAtATime.c` file in `calculate-the-combination-of-n-objects-taken-r-at-a-time` folder
Description
Write a C program to calculate the combination of n objects taken r at a time
Combination is a selection of objects from a group such that (unlike permutations) the order of selection does not matter. The number of combinations on n objects taken r at a time is given by the formula n!/(r!(n-r)!) = n(n-1)(n-2)...(n-r+1)/r!
How to contribute
- Save the solution in `program/CalculateTheCombinationOfNObjectsTakenRAtATime.c` file - Add `CalculateTheCombinationOfNObjectsTakenRAtATime.c` file in `calculate-the-combination-of-n-objects-taken-r-at-a-time` folder