fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int faktorial(int n) {
  5. if (n == 1) {
  6. return 1;
  7. }
  8. else {
  9. return n * faktorial(n - 1);
  10. }
  11. }
  12.  
  13. int main() {
  14. cout << faktorial(12) << endl;
  15. }
  16.  
Success #stdin #stdout 0.01s 5284KB
stdin
Standard input is empty
stdout
479001600