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
阅读全文
结构体 班级版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
阅读全文
班级管理(结构体)【一维数组】
摘要:#include <iostream> using namespace std; struct student{ string student_name; int age; string Gender; }; struct Cless{ string Cless_name; student a[10
阅读全文
奶茶(结构体)【一维数组】
摘要:#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
阅读全文
数组排序(双数组混插版)
摘要:#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[
阅读全文
函数有参无反冒泡排序
摘要:#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
阅读全文
桶排序
摘要:#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+
阅读全文