diff options
| author | bd <bdunahu@operationnull.com> | 2025-02-24 20:48:58 -0500 |
|---|---|---|
| committer | bd <bdunahu@operationnull.com> | 2025-02-24 20:48:58 -0500 |
| commit | 428cdf3d8be3d46ca071967596083da98840fbbd (patch) | |
| tree | 802210ed60b768892bce8172ac2d5a686149b868 /src/fact | |
| parent | 9028b78a0d668a8893d4e5ce65fa1d332be35cfa (diff) | |
Add catch2 testing framework and integrate with CMake
Diffstat (limited to 'src/fact')
| -rw-r--r-- | src/fact/fact.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/fact/fact.cc b/src/fact/fact.cc new file mode 100644 index 0000000..026ad94 --- /dev/null +++ b/src/fact/fact.cc @@ -0,0 +1,7 @@ +#include "fact.h" + +unsigned int +factorial(unsigned int number) +{ + return number <= 1 ? number : factorial(number-1)*number; +} |
