fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. // your code goes here
  5. int i=1,n;
  6. double s=1;
  7. scanf("%d",&n);
  8. while(i<=n)
  9. {s=s*i;
  10. i++;}
  11. printf("s=%.0f\n",s);
  12. return 0;
  13. }
  14.  
  15.  
Success #stdin #stdout 0s 5320KB
stdin
20
stdout
s=2432902008176640000