fork(1) download
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5. int zahl;
  6. int ergebnis = 1;
  7. scanf("%d",&zahl);
  8. int i;
  9. for(i = zahl; i > 1; i--)
  10. {
  11. ergebnis *= i;
  12. }
  13. printf("Die Fakultät von %d ist %d\n",zahl,ergebnis);
  14. return 0;
  15. }
Success #stdin #stdout 0.01s 5284KB
stdin
7
stdout
Die Fakultät von 7 ist 5040