MCPcopy Create free account
hub / github.com/andreasfertig/cppinsights / factorial

Function factorial

tests/ConstexprFunctionHandlerTest.cpp:1–4  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1constexpr int factorial(int n)
2{
3 return n <= 1? 1 : (n * factorial(n - 1));
4}
5
6constexpr float factorialFloat(int n)
7{

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected