Xcode寫C++(程序練習8:求斐波那契數列第n項值)

求斐波那契數列第n項值(1 1 2 3 5 8 13 21 (前兩項相加獲得第三項)) 其實都是用c語言寫的很是基礎的程序,沒有什麼技術含量,爲了將來作題庫用,但願你們別找茬哈!ios #include <iostream> int main() { int n; scanf("%d",&n); int f1 = 1;//前兩項中的第一項 int f2 = 1;//
相關文章
相關標籤/搜索