Task Description
費式數列函式
設計一個可以算出N個數的費式數列的函數getFib。
Hint
getFib.h
打上 function header 以及相關的設定。void getFib(int N);
getFib.c
撰寫程式碼後對應上傳。#include "getFib.h"void getFib(int N) { / add your code /}
main.c
這個檔案無法更改也無須上傳。12345678910 #include <stdio.h>#include "getFib.h" int main() { int N; scanf("%d", &N); getFib(N); return 0;}
Input Format
測試資料為一個整數N。
Output Format
印出由N個數組成的費氏數列(最後不空格)。
Sample Input
1 8
Sample Output
1 0 1 1 2 3 5 8 13