fork download
  1. #include <stdio.h>
  2. int fact(int n){
  3. int a,i;
  4. a=n;
  5. for(i=n-1;i>=1;i--){
  6. a=a*i;
  7. }
  8. return a;
  9. }
  10. int main(void) {
  11. int b;
  12. scanf("%d",&b);
  13. printf("%d",fact(b));
  14. return 0;
  15. }
  16.  
Success #stdin #stdout 0s 5284KB
stdin
100
stdout
Standard output is empty