电脑桌面
添加小米粒文库到电脑桌面
安装后可以在桌面快捷访问

c++大作业学生信息管理系统源代码

c++大作业学生信息管理系统源代码_第1页
1/17
c++大作业学生信息管理系统源代码_第2页
2/17
c++大作业学生信息管理系统源代码_第3页
3/17
学生信息管理系统源代码: #include #include #include #include #include #include struct student { char num[30]; int maths; char name[30]; int chinese; char clas[30]; int english; int total; float average; student *next; }; //◆1(1) void createlist(student * & head) //学生成绩文件导入功能(用链表储存) { char t[80],num0[30],name0[30],clas0[30]; int chinese0,maths0,english0; student *s,*p; ifstream instuf("student-score.txt",ios::in); if (!instuf) {cerr<<"file could not be open."<>num0>>name0>>clas0>>chinese0>>maths0>>english0) { s=new student; strcpy(s->num,num0);strcpy(s->name,name0);strcpy(s->clas,clas0); s->chinese=chinese0;s->maths=maths0;s->english=english0; s->total=s->chinese+s->maths+s->english; s->average=float(s->total)/3; if (head==NULL) head=s; else p->next=s; p=s; } p->next=NULL; instuf.close(); } //◆1(2) void showlist(student *head) //学生成绩信息显示功能(遍历链表) { int n=1; cout<<"学号 姓名 班级 语文 数学 英语 总分 均分 序号 "; while (head) { cout<num<<" "<name<<'\t'<clas<<'\t'<<" "<chinese<<'\t' <maths<<'\t'<english<<'\t'<total<<'\t'<average<<'\t'<<" "<next; } } //◆2 void charu(student *head) //学生成绩信息插入功能(链表尾部插入学生成绩信息) { student *s,*p,*q; int n,i; cout<<"请输入需要【插入】的学生成绩信息的数量: "; cin>>n; cout<<"请输入需插入的学生成绩信息(每人一行):"<next; } for (i=1;i<=n;i++) { s=new student; cin>>s->num>>s->name>>s->clas>>s->chinese>>s->maths>>s->english; s->total=s->chinese+s->maths+s->english; s->average=float(s->total)/3; q->next =s; q=s; } q->next=NULL; } //◆3 void shanchu(student * ...

1、当您付费下载文档后,您只拥有了使用权限,并不意味着购买了版权,文档只能用于自身使用,不得用于其他商业用途(如 [转卖]进行直接盈利或[编辑后售卖]进行间接盈利)。
2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。
3、如文档内容存在违规,或者侵犯商业秘密、侵犯著作权等,请点击“违规举报”。

碎片内容

c++大作业学生信息管理系统源代码

确认删除?
VIP
微信客服
  • 扫码咨询
会员Q群
  • 会员专属群点击这里加入QQ群
客服邮箱
回到顶部