fork download
  1. #include <iostream>
  2.  
  3. long int factorial(int n)
  4. {
  5. if (n <= 1)
  6. return n;
  7. return n*factorial(n-1);
  8. }
  9.  
  10. int main()
  11. {
  12. std::cout << "f(13) = " << factorial (13);
  13. }
Success #stdin #stdout 0s 4152KB
stdin
Standard input is empty
stdout
f(13) = 6227020800