fork download
  1. #include <stdio.h>
  2.  
  3. int kaizyou(int n){
  4. int r,i;
  5. r=1;
  6. for(i=n;i>=1;i--){
  7. r=r*i;
  8. }
  9. return r;
  10. }
  11.  
  12. int main(void){
  13.  
  14. printf("%d",kaizyou(4));
  15.  
  16. return 0;
  17. }
  18.  
Success #stdin #stdout 0s 5288KB
stdin
Standard input is empty
stdout
24