#3981. [GESP202406 七级 C++] 第 13 题

[GESP202406 七级 C++] 第 13 题

下面程序的输出为( )。

#include <iostream>
using namespace std;
int fib(int n) {
    if (n <= 1)
        return n;
    return fib(n - 1) + fib(n - 2);
}
int main() {
    cout << fib(6) << endl;
    return 0;
}

{{ select(1) }}

  • 5
  • 8
  • 13
  • 无法正常结束。