Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

recursive factorial of a number

factorial(N){
    if(N<=1)
    {
      return 1;
    }
    else
    {
      return (N*factorial(N-1));
    }
}
Source by www.scaler.com #
 
PREVIOUS NEXT
Tagged: #recursive #factorial #number
ADD COMMENT
Topic
Name
5+2 =