C++ Program to Find Factorial of a Number

Here I have shared the factorial program in C++. A Factorial is the product of a number and all the numbers below it.

For example, the factorial of 4! = 4 × 3 × 2 × 1 = 24.

Output:

Enter number: 5
Factorial of 5 is: 120

If you have any problem regarding the below factorial program in C++ then you can freely ask it by commenting below.

3 thoughts on “C++ Program to Find Factorial of a Number”

  1. Write a program in c++ to read a single dimension array of size 'n' and create a 2-d array as follows:
    input array: 1 2 3 4
    output array: 1 0 0 1
    0 2 2 0
    0 3 3 0
    4 0 0 4

Leave a Comment

Your email address will not be published. Required fields are marked *