摘要: #include<iostream> #include<string> using namespace std; string name[50],num[50]; int n; int main() {void input_data(); void search(string find_name); 阅读全文
posted @ 2017-12-04 20:14 TOTO2 阅读(283) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std; int main(){ //C++当中字符数组赋值,''单引号中不能为空 char talk[10]={'G','o',' ','p','a','l','y','e','r','!'}; for(int i=0;i using namespace std; int main(){ //C++当... 阅读全文
posted @ 2017-11-27 11:52 TOTO2 阅读(167) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> using namespace std; void select_sort(int array[],int n){ int i,j,k,t; for(i=0;i<n-1;i++){ k=i; for(j=i+1;j<n;j++){ if(array[j]<ar 阅读全文
posted @ 2017-11-27 11:37 TOTO2 阅读(5142) 评论(0) 推荐(0) 编辑
摘要: 第一种方法: 第二种方法(传递参数值) 阅读全文
posted @ 2017-11-21 12:32 TOTO2 阅读(5292) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std; int m(int x,int y,int z); short m(short q,short w,short e); double m(double a,double s,double d); int main(){ int a,b,c,min; cin>>a>>b>>c; min=m(a,b,c); ... 阅读全文
posted @ 2017-11-21 11:16 TOTO2 阅读(136) 评论(0) 推荐(0) 编辑
摘要: #include<iostream> using namespace std; int main() { int arr[10]={6,98,498,56,43,646,894,46,8,89}; for (int i=0;i<10;i++){ cout<<"Êý×é˳Ðò"<<i<<"µÄÊýÖ 阅读全文
posted @ 2017-11-21 11:11 TOTO2 阅读(97) 评论(0) 推荐(0) 编辑
摘要: #include<iostream> 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 阅读全文
posted @ 2017-11-21 11:09 TOTO2 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2017-11-16 14:12 TOTO2 阅读(143) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std; int max(int x ,int y,int z); int main() { int a,b,c,m; cout>a>>b>>c; m=max(a,b,c);//实际参数 ,代表具体数值,在()当中 coutx) x=z; if(y>x) x=y; ... 阅读全文
posted @ 2017-11-16 14:11 TOTO2 阅读(126) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std; template T max(T x ,T y,T z){ if(z>x) x=z; if(y>x) x=y; return x; } int main() { int a,b,c,m; cout>a>>b>>c; m=max(a,b,c); cou... 阅读全文
posted @ 2017-11-16 14:10 TOTO2 阅读(134) 评论(0) 推荐(0) 编辑