上一页 1 2 3 4 5 6 7 8 ··· 14 下一页
摘要: #include <iostream> #include <iomanip> using namespace std; struct wo{ string Name; int ml; int id; int money; }; int main(){ int cl=10; wo teas; teas 阅读全文
posted @ 2024-11-29 19:18 最后一个还有我 阅读(12) 评论(0) 推荐(0)
摘要: #include <iostream> #include <bits/stdc++.h> using namespace std; /* 桶排序思想: 把每个数组开辟的空间看作一个桶, 将与桶编号相同的数据存入桶中 1 3 5 7 9 8 6 4 2 10 数据b[] 开辟桶的个数大于数据最大值 第 阅读全文
posted @ 2024-11-10 09:50 最后一个还有我 阅读(11) 评论(0) 推荐(0)
摘要: #include <iostream> using namespace std; int paixu(int a[10]){ for(int i=0;i<10;i++){ for(int j=i+1;j<10;j++){ if(a[i]<a[j]){ swap(a[i],a[j]); } } } } 阅读全文
posted @ 2024-11-10 09:24 最后一个还有我 阅读(8) 评论(0) 推荐(0)
摘要: #include <iostream> #include <vector> using namespace std; int main(){ vector <int> a; a.push_back(3); a.push_back(2); a.push_back(0); for(int i=0;i<a 阅读全文
posted @ 2024-10-27 09:50 最后一个还有我 阅读(11) 评论(0) 推荐(0)
摘要: #include <iostream> #include <cmath> using namespace std; void a1(int n){ int a[n],i=0,sum=0; for(i=0;n>=1;i++){ a[i]=n%2; n/=2; } for(int j=i-1;j>=0; 阅读全文
posted @ 2024-10-20 09:55 最后一个还有我 阅读(9) 评论(0) 推荐(0)
摘要: #include <iostream> using namespace std; int main(){ string a; freopen("C:/Users/Administrator/Desktop/in/in.txt","r",stdin); freopen("C:/Users/Admini 阅读全文
posted @ 2024-08-02 08:47 最后一个还有我 阅读(20) 评论(0) 推荐(0)
摘要: #include <iostream> using namespace std; int *f(int a[][2]){ for(int i=0;i<2;i++){ for(int j=0;j<2;j++){ a[i][j]++; } } return *a; } int main(){ int a 阅读全文
posted @ 2024-07-08 09:43 最后一个还有我 阅读(11) 评论(0) 推荐(0)
摘要: #include <iostream> //二维数组在函数中的传递 //1.一维数组 //2.函数√ //3传递的方式√ //4.返回二维数组 using namespace std; int main(){ /* 1.二维数组的初始化定义: int a[][];//定义方式错误,编译不成功 int 阅读全文
posted @ 2024-07-08 09:26 最后一个还有我 阅读(15) 评论(0) 推荐(0)
摘要: #include <iostream> using namespace std; int *shuzu(int *a){ for(int i=0;i<5;i++){ *(a+i)+=1; } return a; } int main(){ int a[]={1,2,3,4,5}; shuzu(a); 阅读全文
posted @ 2024-06-30 09:33 最后一个还有我 阅读(10) 评论(0) 推荐(0)
摘要: #include <iostream> int main(){ int n=4,m=13,f,t,o,sum=0; for(int f=0;f<=m;f++){ for(int t=0;t<=m;t++){ for(int o=0;o<=m;o++){ if(f+t+o==4&&f*5+t*2+o* 阅读全文
posted @ 2024-06-28 19:45 最后一个还有我 阅读(8) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 ··· 14 下一页