I have the following code but it is not giving perfect result for factorial can u find it out plz
You need to have a return in your function in the first place. ;)
return