2017年12月18日

摘要: inline 内联 阅读全文

posted @ 2017-12-18 15:59 dragonliu欧美 阅读(88) 评论(0) 推荐(0) 编辑

摘要: 1 #include 2 using namespace std; 3 int m(int x,int y,int z); 4 short m(short q,short w,short e); 5 double m(double a,double s,double d); 6 int main(){ 7 int a,b,c,min; 8 cin>>a>>b>... 阅读全文

posted @ 2017-12-18 15:56 dragonliu欧美 阅读(83) 评论(0) 推荐(0) 编辑

摘要: 1 #include 2 using namespace std; 3 template 4 T max(T x ,T y,T z){ 5 if(z>x) 6 x=z; 7 if(y>x) 8 x=y; 9 return x; 10 } 11 12 int main(){ 13 int a,b,c,m; 14 cin>>... 阅读全文

posted @ 2017-12-18 15:53 dragonliu欧美 阅读(92) 评论(0) 推荐(0) 编辑

2017年12月17日

摘要: #include using namespace std; int main(){ int arr[30]={1,1,2,3,5,8,13}; for(int a=2;a<30;a++){ arr[a]=arr[a-1]+arr[a-2]; } for(int a=0;a<30;a++){ ... 阅读全文

posted @ 2017-12-17 16:47 dragonliu欧美 阅读(274) 评论(0) 推荐(0) 编辑

摘要: 1 #include 2 using namespace std; 3 void compare(int a,int b){ 4 int rand; 5 if(a>x>>y; 15 compare(x,y); 16 } #include using namespace std; int main(){ int x,y,*a,*b,*p; c... 阅读全文

posted @ 2017-12-17 16:24 dragonliu欧美 阅读(133) 评论(0) 推荐(0) 编辑

摘要: 1 #include 2 using namespace std; 3 4 int main(){ 5 int a[8]; 6 for(int i=0;i>a[i]; 8 } 9 for(int i=0;i 2 using namespace std; 3 4 5 6 int main(){ 7 int a[10];... 阅读全文

posted @ 2017-12-17 16:10 dragonliu欧美 阅读(1445) 评论(0) 推荐(0) 编辑

2017年9月21日

摘要: 1 #include 2 using namespace std; 3 int main(){ 4 for(int a=1;a 20 using namespace std; 21 int main(){ 22 cout<<'*'<<'\n'; 23 cout<<'*'<<'*'<<'*'<<'\n'; 24 cout<<'*'<<'*'<<'*' 阅读全文

posted @ 2017-09-21 09:23 dragonliu欧美 阅读(133) 评论(0) 推荐(0) 编辑

摘要: 1 #include 2 using namespace std; 3 int main(){ 4 unsigned short a; 5 short int b=-2; 6 a=b; 7 cout<<"a="<<a<<endl; 8 return 0; 9 } 阅读全文

posted @ 2017-09-21 09:21 dragonliu欧美 阅读(147) 评论(0) 推荐(0) 编辑

摘要: 1 #include 2 using namespace std; 3 int main(){ 4 float x; 5 int i; 6 x=3.6; 7 i=(int)x; 8 cout<<"x="<<x<<",i="<<i<<endl; 9 return 0; 10 } 阅读全文

posted @ 2017-09-21 09:20 dragonliu欧美 阅读(76) 评论(0) 推荐(0) 编辑

摘要: 1 #include 2 using namespace std; 3 #define price 40 4 int main() { 5 int num,total; 6 num=10; 7 total=num*price; 8 cout<<"total="<<total<<endl; 9 return 0; 10 } 阅读全文

posted @ 2017-09-21 09:19 dragonliu欧美 阅读(75) 评论(0) 推荐(0) 编辑