-f instead of fact
-remove the second line
Please find the below corrections:
#include <stdio.h>
int main()
{
int x;
printf("enter the number x");
scanf("%d",&x);
int res=fact(x);
printf("the factorial of %d is%d",x,res);
return(0);
}
int fact(int n)
{
if(n==1)
{
return 1;
}
else{
return n*fact(n-1);
}
}