fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int i = 2, counter, fact = 1;
  5. while(i != 11) {
  6. for (counter = i; counter > 1; counter--) {
  7. fact *= counter;
  8. }
  9. printf("%i\n", fact);
  10. i++;
  11. fact = 1;
  12. }
  13. return 0;
  14. }
  15.  
Success #stdin #stdout 0s 2168KB
stdin
Standard input is empty
stdout
2
6
24
120
720
5040
40320
362880
3628800