fork download
  1. #include<stdio.h>
  2.  
  3. int main()
  4. {
  5. int a,factorial=1,n;
  6. printf("Enter the value of n :");
  7. scanf("%d",&n);
  8. for(a=1;a<=n;a++)
  9. factorial=factorial*a;
  10. printf("\nFACTORIAL OF %d IS %d\n",n,factorial);
  11. return 0;
  12. }
  13.  
  14.  
  15.  
Success #stdin #stdout 1.27s 2172KB
stdin
Standard input is empty
stdout
Enter the value of n :
FACTORIAL OF 1432567373 IS 0