factorial using if loop

Factorial of a number