随笔 - 58  文章 - 1  评论 - 5  阅读 - 10万

随笔分类 -  c++基础

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) 推荐(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) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示