编辑代码

    #include <stdio.h>
    int main ()
   {
       int fac(int n);
       int n;
       int y;
       printf("is input");
       scanf("%d",&n);
       y=fac(n);
       printf("%d! is %d\n",n,y);
       return 0;
   }
int fac(int n)
{
    int f;
    int n;
    if(n<0)
    {
        printf("is no\n");
    }
     else if(n==1||n==0)
     {
         f=1;
     }
      else
     f=fac(n-1)*n;
     return f;
}