如下 C 程式,其執行結果為何?
#include <stdio.h>
int ff(int n) {
int f=0, f0 =1 , f1=1;
while (n > 1) {
n = n -1;
f = f0 + f1;
f0 = f1;
f1 = f;
}
return f;
}
int main() {
int n = 9;
while (n > 0) {
printf(“%d ”,ff(n));
n = n -1; }
}
(A) 55 34 21 13 8 5 3 2 1
(B) 89 55 34 21 13 8 5 3 2
(C) 89 55 34 21 13 8 5 3 1
(D) 55 34 21 13 8 5 3 2 0