0
1.7kviews
Write a recursive program to calculate factorial of accepted number.
1 Answer
1
43views

Algorithm:

Main () Function:

  • Start.
  • Enter a number to be printed.
  • Input a.
  • Fact = CALL factorial (arguments : a).
  • Print fact.
  • Stop

Factorial (parameters : a)

  • Start.
  • If a = 1, then return 1.
  • Else return (a*CALL factorial (arguments : a-1))
  • Stop.

Program:

#include <stdio.h>
#include <conio.h>

int main() …

Create a free account to keep reading this post.

and 3 others joined a min ago.

Please log in to add an answer.