hi i am having a problem with this code.for every input i am getting the same answer 32.any help would be highly appreciated
/*program to find the factorial of a given number*/
#include<stdio.h>
main()
{
int n,fact;
int facto(int );
printf("\nenter the number for which you want to find the factorial");
scanf("%d",&n);
fact=facto(n);
printf("\nthe factorial of yhe number %d is %d",n,fact);
}
int facto(int n)
{
int k;
if(n==1)
return(1);
else
k=n*fact(n-1);
return(k);
}