Learn basic concept of c , c++ and python programming in regularcodes.com

Spread the post

C Factorial number Calculation

Algorithm: Recursive approach.

Ececution process:

Factorial number Find factorial of given number Stack Areamainfactorialnumber (int) =6factorialnumber (int) =5factorialnumber (int) =4factorialnumber (int) =3factorialnumber (int) =2factorialnumber (int) =1

Time complexity of this program O(n)

Factorial of [3] : 6

Factorial of [6] : 720

Factorial of [10] : 3628800

C program to find factorial of given number.

Output
  Factorial of [4] : 24
 Factorial of [6] : 720
 Factorial of [10] : 3628800 

Spread the post