摘要: #include using namespace std; class Array{ private: int array[10]; int max; public: void set_value(){ for(int i=0;i>array[i]; } } ... 阅读全文
posted @ 2017-12-25 18:57 羿龙 阅读(186) 评论(0) 推荐(0) 编辑
摘要: 用类来实现时间输入输出 实参声明 标准类的方法 阅读全文
posted @ 2017-12-25 18:55 羿龙 阅读(124) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std; void select_Sort(int *p,int n){ int i,j,k,t; for(i=0;i>a[i]; } cout<<endl; select_Sort(a,10); cout<<"the sorted array:"<<endl; for(i=0;i<10... 阅读全文
posted @ 2017-12-25 18:48 羿龙 阅读(310) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std; void swap(int *p1,int *p2){ int temp; temp=*p1; *p1=*p2; *p2=temp; } int main(){ int a,b,*point1,*point2; cout>a>>b; point1=&a;b ;po... 阅读全文
posted @ 2017-12-25 18:34 羿龙 阅读(260) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> using namespace std; int main(){ int a=100,b=10; int *pointer1=&a,*pointer2=&b; cout<<a<<" "<<b<<endl; cout<<*pointer1<<" "<<*poin 阅读全文
posted @ 2017-12-25 18:27 羿龙 阅读(472) 评论(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 20:31 羿龙 阅读(743) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> using namespace std; int max(int x,int y,int z=0); int main(){ int a,b,c,m; cout<<"请你输入两个整型的数字:"<<endl; cin>>a>>b; m=max(a,b); cou 阅读全文
posted @ 2017-11-09 21:47 羿龙 阅读(278) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> using namespace std; template<typename T> 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 阅读全文
posted @ 2017-11-09 21:45 羿龙 阅读(128) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> using namespace std; int max(int x ,int y,int z); double max(double x ,double y,double z); long max(long x ,long y,long z); int ma 阅读全文
posted @ 2017-11-09 21:43 羿龙 阅读(123) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> using namespace std; int max(int x ,int y,int z); int main(){ int a,b,c,m; cout<<"请你输入三个整型的数字:"<<endl; cin>>a>>b>>c; m=max(a,b,c); 阅读全文
posted @ 2017-11-09 21:39 羿龙 阅读(81) 评论(0) 推荐(0) 编辑