aboutsummaryrefslogtreecommitdiff
path: root/Project1/helpers.h
blob: 606bef3bc81e781c35f586be996ae2ed8fe977b5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
#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