c7-17.c 184 B

123456789101112131415
  1. #include <stdio.h>
  2. int main()
  3. { int fac(int n);
  4. int i;
  5. for(i=1;i<=5;i++)
  6. printf("%d!=%d\n",i,fac(i));
  7. return 0;
  8. }
  9. int fac(int n)
  10. { static int f=1;
  11. f=f*n;
  12. return(f);
  13. }