```
#include <iostream>
#include <vector>

void getUserNum(int &);
int rFib(int n);
void dispSeq(std::vector<int> &vRef);

int main()
{
    int userNum;
    getUserNum(userNum);
    rFib(userNum);  
    return 0;
}

void getUserNum(int &refVal)
{
    std::cout << "Enter a positive integer:\n";
    std::cin >> refVal;
}

int rFib(int n)
{
     static std::vector<int> fib;
     static bool baseReached = false;
     fib.push_back(n);

     if (baseReached)
     {
             dispSeq(fib);
     }

     if (n <= 1)
     {
        baseReached = true;
        return n;
     }
     else
     {
        return rFib(n-2) + rFib(n-1);
     }
 }

void dispSeq(std::vector<int> &v)
{
    for (size_t i = 0; i < v.size(); i++)
    {
        std::cout << v[i] << " ";
    }
    std::cout << std::endl;
 }

```