/* rectester.cpp tests a recursive Fibonacci function. * * Input: a positive integer n * Output: the nth element of the Fibonacci sequence *************************************************************************/ #include using namespace std; /* RecFibonacci is a recursive Fibonacci number calculator * * Receives: postive integer n * Returns: the n-th Fibonacci number * Your name and other documentation (see programming style sheet) ********************************************************/ // DEFINE RecFibonacci HERE int main() { int number; for (;;) { cout << "Please enter a positive integer: "; cin >> number; if (number > 0) break; cerr << "*** The number must be positive.\n\n"; } cout << "The " << number << "-th Fibonacci number is " << RecFibonacci(number) << endl; }