斐波那契數列(面向對象版)

class Fib{ private: int f, g; public: Fib(int n){ f = 1; g = 0; while (g < n) next(); } int get() { return g;} int next(){ g += f; f =
相關文章
相關標籤/搜索