C++求斐波那契数列的第n项
摘要:#include using namespace std;int fib(int n);int main(){ int a; while(cin>>a) { cout<<"the result: "<<fib(a)<<endl; } return 0;}i...
阅读全文
posted @
2016-08-24 16:06
lie隼
阅读(3679)
推荐(0) 编辑
使用默认参数的构造函数
摘要:#include using namespace std;class Box{public: Box(int h=10,int w=10,int len=10); int volume();private: int height; int width; int leng...
阅读全文
posted @
2013-11-01 17:16
lie隼
阅读(242)
推荐(0) 编辑