C program to find NCR Factorial of a Number

In this tutorial you will learn about the C program to find NCR Factorial of a Number and its application with practical example.

C program to find NCR Factorial of a Number

In this tutorial, we will learn to create a C program that will find NCR Factorial of a Number using C programming.

Prerequisites

Before starting with this tutorial, we assume that you are the best aware of the following C programming topics:

  • Operators in C Programming.
  • Basic Input and Output function in C Programming.
  • Basic C programming.
  • For Loop in C programming.
  • Arithmetic operations in C Programming.

Algorithm:-

Finding the NCR Factorial of a number:-

In this program, we will take the input numbers N and R from the user. Then we will pass that number to a for loop to calculate the factorial. Then we will print that factorial for N & R using the printf() function.

With the help of the below program, we can find the NCR Factorial of a Number.

Program Code:-

 

Output:-

In the above program, we have first initialized the required variable.

  • no= it will hold the integer value for the input.
  • re = it will hold the integer value for the input.
  • i = it will hold the integer value for the controlling of the loop.

Taking the input N and R number from the user.

Converting the factorial for the number.

Printing output.

In this tutorial we have learn about the C program to find NCR Factorial of a Number and its application with practical example. I hope you will like this tutorial.