Factorial of a number
Factorial of a non-negative number is the multiplication of all positive numbers that are smaller than are equal to n.
Formula: n! = n*(n-1)\(n-2)*... 2\1
n=5 => 5*4*3*2*1
n=5 => 1*2*3*4*5
factorial of 5 is 120
0! = 1
Factorial using for loop:
public...
sirishachallagiri.hashnode.dev2 min read