C语言-学生成绩管理系统(共5页).doc
精选优质文档-倾情为你奉上在TC环境下吧,界面是一片的黑。可以实现成绩的录入、查询、排序、物理删除、永久删除记不太清楚了,当时我们的报告要求手写的,也没留下什么电子资料。C语言还是很好学很好用的,希望对大家有帮助!#include<stdio.h> #include<stdlib.h> #include<conio.h> #include<string.h> struct student int id; char name10; int age; char sex10; char birthady20; char address50; char tel15;char E_mail30;st50; int i=0; void shuru() char a; do printf("ninput num:"); scanf("%d",&sti.id); fflush(stdin); printf("ninput name:"); gets(sti.name); printf("ninput age:"); scanf("%d",&sti.age); fflush(stdin); printf("ninput sex:"); gets(sti.sex); fflush(stdin); printf("ninput birth:"); gets(sti.birthady); fflush(stdin); printf("ninput address:"); gets(sti.address); printf("ninput tell:"); scanf("%s",&sti.tel);printf("ninput E_mail:");scanf("%s",&sti.E_mail);printf("nWhether input another student's information ?(y/n)"); fflush(stdin); a=getchar(); i+; while(a='y' && i<=50); void xianshi() int j;printf("=XUESHENG XINXIGUANLIXITONG=n"); printf("numtnametagetsextbirthtaddr tell E_mailn"); for(j=0;j<i;j+) printf("%dt%st%dt%st%st%s%12s%18sn", stj.id,stj.name,stj.age,stj.sex,stj.birthady,stj.address,stj.tel,stj.E_mail); printf("=ZHI ZUO REN:sunqi=n"); void clearscreen() getchar(); system("cls");void paixu() int j,k; int temp; for(j=0;j<i;j+) for(k=0;k<i-1-j;k+) if(stk.age<stk+1.age) temp=stk.age; stk.age=stk+1.age; stk+1.age=temp; xianshi(); void chazhao() int m=0; char name20,b; do printf("ninput name of student:"); fflush(stdin); gets(name); for(m=0;m<20;m+) if(strcmp(name,stm.name)=0) printf("ntThe student is found in %d!n",m+1); break; if(m>=20) printf("ntCan not find this student!n"); else printf("numtnametagetsextbirthtaddr tell E_mailn"); printf("%dt%st%dt%st%st%s%12s%18sn", stm.id,stm.name,stm.age,stm.sex,stm.birthady,stm.address,stm.tel,stm.E_mail); printf("nFind another student?(y/n)"); fflush(stdin); b=getchar(); while(b='y'); void shanchu() char name20,c; int a,b; do printf("nInput the name of delet student:n"); fflush(stdin); gets(name); for(a=0;a<i;a+) if(strcmp(name,sta.name)=0) break; for(b=a;b<i;b+) stb=stb+1; if(a>i) printf("tCan not find this student!n"); else i-; xianshi(); printf("nContinue delet a student?(y/n) "); fflush(stdin); c=getchar(); while(c='y'); void charu() shuru(); paixu(); void main() int change; do system("cls"); printf("*XUESHENG XINXI GUANLIXITONG *n"); printf(" 1: shuru xuesheng xingxin"); printf(" 2: xianshi xuesheng xinxin"); printf(" 3: chazhao xuesheng xinxin"); printf(" 4: shanchu xuesheng xinxin"); printf(" 5: charu xuesheng xinxin"); printf(" 6: paixu xuesheng xinxin"); printf(" 7: tuichu chengxun");printf("*n");fflush(stdin); printf("shuru gongneng xuanxiang:"); scanf("%d",&change); switch(change) case 1: shuru(); break; case 2: xianshi(); break; case 3: chazhao(); break; case 4: shanchu(); break; case 5: charu(); break; case 6:paixu();break;case 7:break; getch(); while(change!=7); 专心-专注-专业