【精】【C语言】班级学生信息管理系统源代码_第1页
【精】【C语言】班级学生信息管理系统源代码_第2页
【精】【C语言】班级学生信息管理系统源代码_第3页
已阅读5页,还剩3页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

#include<stdio.h>#include<windows.h>#include<conio.h>intadd();intamend();intremove();intshow_student();intshow_class();structinfo //用于存储学生信息{charname[20]; //姓charsex[20]; //性别charidcard[20]; //身份证号charstuid[10]; //学号characademe[20]; //学charspecialty[20]; //专业charclassid[20]; //班级charhome[20]; //生源地}stu[100];intj=0;intmain(void) //主函数{/**/chargongnengxuanzhe;intflag=1;system("cls");printf("\n");printf("\t\t\t\t printf("\n\n\t尊敬的用户,非常感谢您使用本系统,您的完美体验将是我们前进的方向!\n\n\n");printf("\t系统功能简介:\n\n\n");printf("\t\t①\n\n");printf("\t\t②\n\n");\n\n");printf("\t\t④\n\n");printf("\t\t⑤\n\n");printf("\t\t⑥\n\n\n");printf("\t按任意键进入系统 ");getch();do{system("cls");printf("\n\n\n");printf(" !\n");printf("\n\n\n");printf(" 1.\n\n");printf(" printf(" 3.\n\n");printf(" 4.\n\n");printf(" 5.\n\n");printf(" 0.\n\n\n\n");printf(" gongnengxuanzhe=getch();switch(gongnengxuanzhe){case'1':add();break;case'2':amend();break;case'3':remove();break;case'4':show_student();break;case'5':show_class();break;case'0':flag=0;break;default:{printf("\n\n 您的输入有误请仔细阅读使用说printf("\n 任意键继...");getch();}}system("cls");printf("\n\n\n\n\n\n\n\n\n\n\tprintf("\n\n\t\t\t 按任意键退出系统 ");getch();return0;}intadd() //增加学生信息函数{charflag='1';do{system("cls");printf("\n\t姓名:");scanf("%s",&stu[j].name);printf("\n\n\t性别:");scanf("%s",&stu[j].sex);printf("\n\n\tscanf("%s",&stu[j].idcard);printf("\n\n\t:");printf("\n\n\t专业:");scanf("%s",&stu[j].specialty);printf("\n\n\t班级:");scanf("%s",&stu[j].classid);printf("\n\n\t学号:");scanf("%s",&stu[j].stuid);printf("\n\n\t生源地:");scanf("%s",&stu[j].home);j++;printf("\n\t1,:");getchar();flag=getchar();}while(flag=='1');return0;}intamend() //修改学生信息函数{if(j==0){");}

system("cls");printf("\n\n\n\n\n\n\n\n\n\n\t\t 系统无任何可以修改的记录,请先行输入数据!printf("\n\n\t\t\t 按任意键返回 ");getch();return0;chara[20];intz;intflag=0;do{system("cls");printf("\n\tscanf("%s",a);for(z=0;z<j;z++){if(strcmp(stu[z].stuid,a)==0){flag=1;break; //break不会执行}}if(flag==0){printf("\t对不起,你请求学生信息不存在,请核实后重!\n");printf("\t按任意键继续 ");getch();}}while(flag==0);system("cls");printf("\n\t姓名:");scanf("%s",&stu[z].name);printf("\n\n\t性别:");scanf("%s",&stu[z].sex);printf("\n\n\tscanf("%s",&stu[z].idcard);printf("\n\n\t:");printf("\n\n\t专业:");scanf("%s",&stu[z].specialty);printf("\n\n\t班级:");scanf("%s",&stu[z].classid);printf("\n\n\t学号:");scanf("%s",&stu[z].stuid);printf("\n\n\tscanf("%s",&stu[z].home);return0;}intremove() //删除学生信息函数{if(j==0){");}

system("cls");printf("\n\n\n\n\n\n\n\n\n\n\t\t 系统无任何可以删除的记录,请先行输入数据!printf("\n\n\t\t\t 按任意键返回 ");getch();return0;charintz;intx;intflag=0;do{system("cls");printf("\n\tscanf("%s",a);for(z=0;z<j;z++){if(strcmp(stu[z].stuid,a)==0){flag=1;for(x=z;x<j;x++){}j--;

strcpy(stu[x].name,stu[x+1].name);strcpy(stu[x].sex,stu[x+1].sex);strcpy(stu[x].idcard,stu[x+1].idcard);strcpy(stu[x].academe,stu[x+1].academe);strcpy(stu[x].specialty,stu[x+1].specialty);strcpy(stu[x].classid,stu[x+1].classid);strcpy(stu[x].stuid,stu[x+1].stuid);strcpy(stu[x].stuid,stu[x+1].stuid);printf("\n\t删除成功!");printf("\n\t按任意键返回上级菜单 ");getch();}}if(flag==0){printf("\t对不起,你请求学生信息不存在,请核实后重!\n");printf("\t按任意键继续 ");getch();}}while(flag==0);return0;}intshow_student() //单个显示学生信息函数{if(j==0){");

system("cls");printf("\n\n\n\n\n\n\n\n\n\n\t\t 系统无任何可以显示的记录,请先行输入数据!printf("\n\n\t\t\t 按任意键返回 ");getch();return0;}chara[20];intz;intflag=0;do{system("cls");printf("\n\tscanf("%s",a);for(z=0;z<j;z++){if(strcmp(stu[z].stuid,a)==0){flag=1;system("cls");printf("\n\t姓名:%s",stu[z].name);printf("\n\n\t性别:%s",stu[z].sex);printf("\n\n\t身份证号:%s",stu[z].idcard);printf("\n\n\t学:%s",stu[z].academe);printf("\n\n\t专业:%s",stu[z].specialty);printf("\n\n\t班级:%s",stu[z].classid);printf("\n\n\t学号:%s",stu[z].stuid);printf("\n\n\t生源地:%s",stu[z].home);printf("\n\n\t按任意键返回上级菜单 getch();}}if(flag==0){printf("\t对不起,你请求显示的学生信息不存在,请核实后重!\n");printf("\t按任意键继续 ");getch();}}while(flag==0);return0;}intshow_class() //显示整个班级学生信息函数{if(j==0){");

system("cls");printf("\n\n\n\n\n\n\n\n\n\n\t\t 系统无任何可以显示的记录,请先行输入数据!printf("\n\n\t\t\t 按任意键返回 ");getch();return0;}charintz;intx;intflag=0;do{system("cls");printf("\n\tscanf("%s",a);for(z=0;z<j;z++){if(strcmp(stu[z].classid,a)==0){flag=1;system("cls");printf("\t%s %s\n",stu[z].specialty,stu[z].classid);for(x=0;x<j;x++){if(strcmp(stu[x].classid,a)==0){printf("\n\n\t姓名:%s",stu[z].name);printf("\n\t性别:%s",stu[z].sex);printf("\n\t身份证号:%s",stu[z].idcard);printf("\n\t:%s",stu[z].academe);printf("\n\t专业:%s",stu[z].specialty);printf("\n\t班

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

最新文档

评论

0/150

提交评论