c语言教务管理系统Word文档下载推荐.docx

上传人:b****3 文档编号:18441629 上传时间:2022-12-16 格式:DOCX 页数:32 大小:18.93KB
下载 相关 举报
c语言教务管理系统Word文档下载推荐.docx_第1页
第1页 / 共32页
c语言教务管理系统Word文档下载推荐.docx_第2页
第2页 / 共32页
c语言教务管理系统Word文档下载推荐.docx_第3页
第3页 / 共32页
c语言教务管理系统Word文档下载推荐.docx_第4页
第4页 / 共32页
c语言教务管理系统Word文档下载推荐.docx_第5页
第5页 / 共32页
点击查看更多>>
下载资源
资源描述

c语言教务管理系统Word文档下载推荐.docx

《c语言教务管理系统Word文档下载推荐.docx》由会员分享,可在线阅读,更多相关《c语言教务管理系统Word文档下载推荐.docx(32页珍藏版)》请在冰豆网上搜索。

c语言教务管理系统Word文档下载推荐.docx

//登陆界面结构体

structself

{

chara[10];

charb[10];

intflg;

}s[100]={{"

admin"

"

1},{"

1"

1}};

//目录界面结构体

structstudent

charnum[10];

charname[10];

floatchinese;

floatenglish;

floatmath;

floatsum;

inta;

}stu[5]={{"

1100"

小明"

12,18,20,50,1},{"

1101"

小样"

20,80,60,160,1}};

//登陆界面

voidmain()

load();

}

voidload()

background1();

choice1();

voidbackground1()

puts("

"

);

printf("

********************************************\n"

欢迎登录学生管理系统"

1.登录2.注册\n"

请选择:

"

voidchoice1()

scanf("

%d"

&

a);

fflush(stdin);

switch(a)

{

case1:

denglu();

break;

case2:

zhuce();

default:

fanhui1();

}

voidfanhui1()

输入错误!

\n"

请重新输入!

system("

cls"

voiddenglu()

structselfs2;

charc;

inti=0;

intj=0;

请输入用户名:

%s"

s2.a);

请输入密码:

c=getch();

while(c!

=13)

printf("

*"

s2.b[i]=c;

i++;

while((c=getch())==8)

{

if(i==0)

continue;

putchar('

\b'

'

s2.b[--i]=0;

}

s2.b[i]=0;

s2.flg=1;

puts("

puts(s2.b);

for(i=0;

i<

100;

i++)

if(!

strcmp(s[i].a,s2.a)&

&

!

strcmp(s[i].b,s2.b))

{

printf("

成功!

system("

\n\n\n\n\n\n\n\n\n\t\t\t欢迎进入学生管理系统\n\n\n"

Sleep(2000);

mulu();

}

else

j++;

if(j==100)

fanhui1();

voidzhuce()

structselfs3;

charc,d;

inti,j;

i=0;

请输入帐号:

gets(s3.a);

puts(s3.a);

s3.b[i]=c;

s3.b[--i]=0;

s3.b[i]=0;

s3.flg=1;

确定'

y'

取消'

n'

%c"

d);

if(d=='

||d=='

Y'

j=chazhao();

s[j]=s3;

注册成功!

shuchu();

system("

fanhui1();

else

intchazhao()

inta,i;

for(i=0;

if(s[i].flg==0)

a=i;

break;

returni;

//目录界面

voidmulu()

background();

choice();

voidbackground()

*****************************************\n"

/////////////////////^_^\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\n"

******************************************\n"

欢迎进入学生成绩管理系统"

****************************************\n"

请输入业务:

1.查看所有记录显示\n"

2.添加学生成绩\n"

3.修改学生成绩\n"

4.删除学生成绩\n"

5.清空记录\n"

6.按要求查询学生成绩\n"

7.按要求排序\n"

8.按要求统计成绩\n"

9.退出\n"

请选择:

voidchoice()

%d\n"

a);

switch(a)

case1:

output();

case2:

add();

case3:

xiugai();

case4:

shanchu();

case5:

del();

case6:

chaxun();

case7:

paixu();

case8:

tongji();

case9:

finish();

default:

system("

mulu();

voidadd()

inti;

charc,a;

shuchu();

1输入2返回主界面\n"

if(a==1)

5;

if(stu[i].a==0)

break;

请输入学号:

scanf("

stu[i].num);

fflush(stdin);

\n请输入姓名:

stu[i].name);

\n请输入语文成绩:

%f"

stu[i].chinese);

\n请输入英语成绩:

stu[i].english);

\n请输入数学成绩:

stu[i].math);

stu[i].a=1;

stu[i].sum=stu[i].chinese+stu[i].english+stu[i].math;

y返回主界面"

c);

if(c=='

||c=='

system("

mulu();

else

add();

elseif(a==2)

mulu();

输入错误,请重新输入!

add();

voidxiugai()

chara;

1修改2返回主界面"

charb[10];

charc;

inti;

intj=0;

请输入需要修改的人的姓名或者学号:

gets(b);

puts(b);

strcmp(stu[i].name,b)||!

strcmp(stu[i].num,b))

\n请输入需要修改的学号:

scanf("

fflush(stdin);

\n请输入需要修改的姓名:

\n请输入需要修改的语文成绩:

\n请输入需要修改的英语成绩:

\n请输入需要修改的数学成绩成绩:

stu[i].sum=stu[i].chinese+stu[i].english+stu[i].math;

if(j==5)

printf("

xiugai();

xiugai();

voidshanchu()

1删除2返回主界面:

请输入需要删除的人的学号或者姓名:

stu[i].a=0;

删除成功!

shanchu();

是否返回主界面:

(y是)"

else

shanchu();

voiddel()

1清空2返回主界面"

确定?

(y确定)"

if(a=='

||a=='

inti;

for(i=0;

del();

输入错误,请重新输入!

del();

voidchaxun()

1查询2返回主界面"

请选择;

请输入需要查询的人的学号或者姓名:

\n学号:

%-6s"

\n姓名:

\n语文成绩:

%-6.2f"

stu[i].chinese);

\n英语成绩:

stu[i].english);

\n数学成绩:

stu[i].math);

\n总成绩:

stu[i].sum);

chaxun();

是否返回主页面:

继续查找!

chaxun();

 

voidpaixu()

1排序2返回主界面"

inti,j;

intaa;

structstudents;

1降序排列2升序排列"

aa);

for(j=0;

j<

4;

j++)

if(aa==1)

{

if(strcmp(stu[j].num,stu[j+1].num)<

0)

{

s=stu[j];

stu[j]=stu[j+1];

stu[j+1]=s;

}

}

if(aa==2)

if(strcmp(stu[j].num,stu[j+1].num)>

if(aa!

=1&

aa!

=2)

paixu();

继续!

paixu();

voidtongji()

1统计2返回主界面"

请输入统计条件:

1.参加考试的学生人数\n"

2.语文最高分\n"

3语文及格的人数\n"

4.语文及格率\n"

5.英语最高分\n"

6.英语及格的人数\n"

7.英语及格率\n"

8.数学最高分\n"

9.数学及格人数\n"

10.数学及格率\n"

11.总成绩最高\n"

if(c==1)

intj;

j=zongren();

参加考试的人数是:

j);

back();

elseif(c==2)

floata;

a=chinese();

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 医药卫生 > 基础医学

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1