2018年3月26日

c++基础_矩阵乘法

摘要: #include using namespace std; int main(){ int a,b; cin>>a>>b; long c[a][a],c1[a][a],c2[a][a],temp[a][a]; for(int i=0;i>c[i][j]; c1[i][j]=c[i][j]; c2[i][j]=c... 阅读全文

posted @ 2018-03-26 22:25 我吃你大西瓜 阅读(416) 评论(0) 推荐(0) 编辑

c++基础_字符串对比

摘要: #include #include #include using namespace std; int main(){ char a[11]; char b[11]; cin.getline(a,11); //cout<<strlen(a); //可以计算出有内容的字符个数 需要导入库 int aNum=strlen(a); cin.g... 阅读全文

posted @ 2018-03-26 22:24 我吃你大西瓜 阅读(370) 评论(0) 推荐(0) 编辑

c++基础_时间转换

摘要: #include using namespace std; int main(){ int n; cin>>n; int a=0,b=0,c=0; if((n/3600)!=0){ a=n/3600; n=n%3600; } if((n/60)!=0){ b=n/60; ... 阅读全文

posted @ 2018-03-26 22:23 我吃你大西瓜 阅读(235) 评论(0) 推荐(0) 编辑

c++基础_特殊回文数

摘要: #include using namespace std; int main(){ int n; cin>>n; for(int i=10000;i<1000000;i++){ int temp=i; int total=0,m=0; while(temp){ total=total+(temp%... 阅读全文

posted @ 2018-03-26 22:21 我吃你大西瓜 阅读(249) 评论(0) 推荐(0) 编辑

c++基础_回文数

摘要: #include using namespace std; int main(){ for(int i=1000;i0){ m=n%10+m*10; n=n/10; } if(m==i){ cout<<i<<endl; } } } 阅读全文

posted @ 2018-03-26 22:20 我吃你大西瓜 阅读(2453) 评论(0) 推荐(0) 编辑

c++基础_特殊的数字

摘要: #include #include using namespace std; int main(){ for(int i=100;i<1000;i++){ int a=i%10; int aa=(i/10)%10; int aaa=(i/100); int SanCiFang=pow(a,3)+pow(aa,3)+po... 阅读全文

posted @ 2018-03-26 22:18 我吃你大西瓜 阅读(262) 评论(0) 推荐(0) 编辑

c++基础_杨辉三角形

摘要: #include using namespace std; int main(){ int n; cin>>n; int a[34][34]; for(int i=0;i<n;i++){ a[i][0]=1; a[i][i]=1; for(int j=1;j<i;j++){ a[... 阅读全文

posted @ 2018-03-26 22:16 我吃你大西瓜 阅读(327) 评论(0) 推荐(0) 编辑

c++基础_字母图形

摘要: #include #include using namespace std; int main(){ int n=0,m=0,c; cin>>n;cin>>m; char a[28][28]; for(int i=0;i<n;i++){ for(int j=0;j<m;j++){ c=abs(i-j); ... 阅读全文

posted @ 2018-03-26 22:15 我吃你大西瓜 阅读(334) 评论(0) 推荐(0) 编辑

c++基础_01字串

摘要: #include using namespace std; int main(){ for(int a=0;a<=1;a++){ for(int b=0;b<=1;b++){ for(int c=0;c<=1;c++){ for(int d=0;d<=1;d++){ for(int e=0;e<=1;e++){ cout<<a<<b<<c<<d<<e<<endl; } } } } } }... 阅读全文

posted @ 2018-03-26 22:12 我吃你大西瓜 阅读(279) 评论(0) 推荐(0) 编辑

2017年11月29日

java 常用集合类型--以及其特性

摘要: 1:集合: (1) Collection(单列集合) List(有序,可重复) ArrayList 底层数据结构是数组,查询快,增删慢 线程不安全,效率高 Vector 底层数据结构是数组,查询快,增删慢 线程安全,效率低 LinkedList 底层数据结构是链表,查询慢,增删快 线程不安全,效率高 阅读全文

posted @ 2017-11-29 22:42 我吃你大西瓜 阅读(288) 评论(0) 推荐(0) 编辑

导航