fork download
  1. #include <stdio.h>
  2.  
  3. int main() {
  4. int n, i;
  5. long long fact = 1;
  6.  
  7. printf("Enter a number: ");
  8. scanf("%d", &n);
  9.  
  10. for(i = 1; i <= n; i++) {
  11. fact *= i;
  12. }
  13.  
  14. printf("Factorial of %d = %lld\n", n, fact);
  15. return 0;
  16. }
Success #stdin #stdout 0s 5320KB
stdin
Standard input is empty
stdout
Enter a number: Factorial of 32764 = 0