fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int a, f;
  5. f = 1;
  6. int i = 1;
  7.  
  8. scanf("%d,&a");
  9.  
  10. while(i <= a) {
  11. f = f * i;
  12. i++;
  13. }
  14.  
  15. printf("%d\n" , f);
  16.  
  17. return 0;
  18. }
  19.  
Success #stdin #stdout 0.01s 5304KB
stdin
5
stdout
1