[ad_1]
This will always return 0, because the last fac will always be 0 and it multiplies all the other results. Change that to
if(a<1)
fac=1;
Also indent your code properly.
[ad_2]
solved what is wrong with my factorial program ??? [closed]
[ad_1]
This will always return 0, because the last fac will always be 0 and it multiplies all the other results. Change that to
if(a<1)
fac=1;
Also indent your code properly.
[ad_2]
solved what is wrong with my factorial program ??? [closed]