Factorial Program with structures and pointers C++

Factorial Program with structures and pointers C++.

Following concepts are used in this program

  • structure = For example “factorial”
  • Pointers = For example “*fac”
  • for loop = For example “for(int i=1;i<=(*fac).num;i++)”
Output

Enter a number for factorial:

4

DISPLAY RESULT

factorial of a number:  is= 24