text cover

Data Abstraction and Problem Solving with C++

Walls and Mirrors

by Frank M. Carrano

Addison Wesley Logo

c02p089.cpp

Go to the documentation of this file.
00001 
00021 int rabbit(int n)
00022 {
00023    if (n <= 2)
00024       return 1;
00025 
00026    else // n > 2, so n-1 > 0 and n-2 > 0
00027       return rabbit(n-1) + rabbit(n-2);
00028 }  // end rabbit

Generated on Sun Aug 27 11:05:08 2006 for AWLogo by  doxygen 1.4.6