后面少了个)
f函数写错了,修改如下:
void f(int *a,int n) { int k; a[0] = 1; a[1] = 1; for (k=2;k<=n;k++) { a[k] = a[k-1]+a[k-2]; } }