# C Program to Calculate Permutation and Combination

In this tutorial, we will see a new concept that is C Program to Calculate Permutation and Combination.

Permutation : It means an arrangement of the things. When we say arrangement then we consider the order of the things.

Formula to calculate permutation

We calculate permutation formula, given as follow

Number of permutation of  ‘n‘ different things taken ‘r’ at a time is given by,

npr = n!/(n-r)!

Example: Suppose we have to form the number of consisting of three digits using the digits 1, 2 3,4. To form this number the digits have to be arranged. The different number will get formed depending upon the order in which we arrange the digits.

Combination : It means selection of the things. The order of things are considered where word selection is not important.

Formula to calculate Combination

We calculate combination by formula , given as follow

nCr = n! / (n-r)! . r!

Example: Suppose that we have to make a team of 11 out of the members 20.

This is an example of the combination because an order of the member will not result in a change in the team that is no matter. No matter in which order we choose and male a order of the team only making the team of 11 is important.

Concept you need to know from c

Functions in c

## C Program to Calculate Permutation and Combination

Output :

Explanation :

1. write main function.

2. Declare variable.

3. Take input n and r.

4.  Calculate permutation and combination.

5. Print permutation and combination.