Task Description
費式數列遞迴版(會檢查fuction是否用遞迴)
請用遞迴算出一整數的費式數列之值。(會檢查fuction是否用遞迴)
費式數列規則如下:

Hint
fibr.h
打上 function header 以及相關的設定。int fibr(int n);
fibr.c
撰寫程式碼後對應上傳。12345 #include "fibr.h" int fibr(int n) { // add your code}
main.c
這個檔案無法更改也無須上傳。123456789 #include <stdio.h>#include "fibr.h" int main() { int n; scanf("%d", &n); printf("%d", fibr(n)); }
Input Format
測試資料為一個整數n。
Output Format
請運用遞迴版費式數列求出解。
Sample Input
1 5
Sample Output
1 8