c02p077.txt
来自「Data Abstraction & Problem Solving with 」· 文本 代码 · 共 14 行
TXT
14 行
int rabbit(int n)// ---------------------------------------------------// Computes a term in the Fibonacci sequence.// Precondition: n is a positive integer.// Postcondition: Returns the nth Fibonacci number.// ---------------------------------------------------{ if (n <= 2) return 1; else // n > 2, so n-1 > 0 and n-2 > 0 return rabbit(n-1) + rabbit(n-2);} // end rabbit
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?