diff options
| author | austinlujan <[email protected]> | 2024-03-21 03:53:27 -0700 |
|---|---|---|
| committer | austinlujan <[email protected]> | 2024-03-21 03:53:27 -0700 |
| commit | d1dba197cae53aaff3616df61fd1a0d8d5f26f97 (patch) | |
| tree | 84774576f2a66ac33426673dee4a23d699b2a094 /Project1/helpers.h | |
| parent | init commit (diff) | |
| download | homework-3-austinlujan-main.tar.xz homework-3-austinlujan-main.zip | |
Diffstat (limited to 'Project1/helpers.h')
| -rw-r--r-- | Project1/helpers.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/Project1/helpers.h b/Project1/helpers.h index 6f70f09..606bef3 100644 --- a/Project1/helpers.h +++ b/Project1/helpers.h @@ -1 +1,13 @@ -#pragma once +#ifndef FUNCTIONS_H +#define FUNCTIONS_H + +#include <iostream> + +class RecursiveFunctions { +public: + static long factorial(int n); // integer n returns its factorial as a long + static int fibonacci(int n); // integer n returns the nth term in the fibonacci sequence + static double power(double base, int exponent); //double base and an integer exponent returns base raised to the exponent power +}; + +#endif |