11 2024 档案
班级管理最简版(结构体)【一维数组】
摘要:#include<iostream> using namespace std; struct st{ string st_name; int st_age; void d(){ cout<<st_name<<" "<<st_age; } }; struct c1{ string cl_name; s 阅读全文
posted @ 2024-11-30 09:51 爱吃泡面的皮卡 阅读(6) 评论(0) 推荐(0) 编辑
结构体 班级版2(结构体)【一维数组】
摘要:#include<iostream> using namespace std; struct st{ string st_name; int st_age; }; struct c1{ string cl_name; st st1[7]; st st2[7]; }; struct a1{ c1 st 阅读全文
posted @ 2024-11-30 09:32 爱吃泡面的皮卡 阅读(4) 评论(0) 推荐(0) 编辑
班级管理(结构体)【一维数组】
摘要:#include <iostream> using namespace std; struct student{ string student_name; int age; string Gender; }; struct Cless{ string Cless_name; student a[10 阅读全文
posted @ 2024-11-30 08:51 爱吃泡面的皮卡 阅读(3) 评论(0) 推荐(0) 编辑
奶茶(结构体)【一维数组】
摘要:#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-30 08:09 爱吃泡面的皮卡 阅读(7) 评论(0) 推荐(0) 编辑
数组排序(双数组混插版)
摘要:#include <iostream> using namespace std; void sni(int a[],int b[],int c[]){ int an=4,bn=8,cn=12; int i=0,j=0,k=0; while(i<an&&j<bn){ if(a[i]>b[j]){ c[ 阅读全文
posted @ 2024-11-16 08:33 爱吃泡面的皮卡 阅读(9) 评论(0) 推荐(0) 编辑
函数有参无反冒泡排序
摘要:#include <iostream> using namespace std; void s(int a[100]){ for(int i=1;i<=10;i++){ for(int j=i+1;j<=10;j++){ if(a[i]>a[j]){ swap(a[i],a[j]); } } } f 阅读全文
posted @ 2024-11-10 09:33 爱吃泡面的皮卡 阅读(2) 评论(0) 推荐(0) 编辑
桶排序
摘要:#include <iostream> using namespace std; int main(){ int a[10]={1,3,5,7,9,8,6,4,2,10}; int b[11]; for(int i=0;i<11;i++){ b[i]=0; } for(int i=0;i<10;i+ 阅读全文
posted @ 2024-11-10 09:33 爱吃泡面的皮卡 阅读(4) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示