#4030. [GESP202412 七级 C++] 第 12 题

[GESP202412 七级 C++] 第 12 题

下面程序的输出为( )。

#include <iostream>
#define N 10
using namespace std;
int h[N];
int main() {
    h[0] = h[1] = 1;
    for (int n = 2; n < N; n++)
        for (int j = 0; j < n; j++)
            h[n] += h[j] * h[n - j - 1];
    cout << h[6] << endl;
    return 0;
}

{{ select(1) }}

  • 132
  • 1430
  • 16796
  • 结果是随机的。