text: Program for factorial of a number | C program to find factorial of given number ; function to find factorial of given number ; Driver Code
code: #include < stdio . h NEW_LINE unsigned int factorial ( unsigned int n ) { if ( n == 0 ) return 1 ; return n * factorial ( n - 1 ) ; } int main ( ) { int num = 5 ; printf ( " Factorial ▁ of ▁ % d ▁ is ▁ % d " , num , factorial ( num ) ) ; return 0 ; }