Answers for "how to find factorial of a number using recursion in class"

1

Factorial of a number using recursion

#include <stdio.h>
int factorial(int number){
    if(number==1){
        return number;
    }
    return number*factorial(number - 1);
}
int main(){
    int a=factorial(5);
    printf("%d",a);
}
Posted by: Guest on June-20-2021

Code answers related to "how to find factorial of a number using recursion in class"

Code answers related to "Javascript"

Browse Popular Code Answers by Language