Answers for "factorial in stl cpp"

C++
0

built in factorial function in c++

int factorial(int n)
{
  return (n == 1 || n == 0) ? 1 : factorial(n - 1) * n;
}
Posted by: Guest on November-01-2021

Browse Popular Code Answers by Language