INTRODUCTION TO PROGRAMMING IN C++
Kalamazoo College

FIBONACCI LAB*


Familiarize yourself with the Fibonacci numbers.

Write a recursive function to compute the nth Fibonacci number.

Explore the efficiency of your Fibonacci function.

Try out a more efficient implementation.

When you are done, turn in your print-out of fibonacci.cpp with your answer to the question from the third part of the lab.

If you have extra time, you can start work on the programming project (due next week at the beginning of lab).


*This lab is based on Programming Exercise P5.21 from Computing Concepts with C++ Essentials by Cay Horstman, John Wiley & Sons, Inc., 1999 and on the example from Section 1.2.2 of Structure and Interpretation of Computer Programs by Harold Abelson and Gerald Jay Sussman with Julie Sussman, MIT Press, 1985.