c语言按给定成绩查询,C语言学生成绩管理系统(简易版)

#include

#include

#include

int readstudents(struct students stu[]); //读取学生信息

int readsexcode(struct sexcode sex[]); //读取性别代码

int readcollegecode(struct collegecode colle[]); //读取学院代码

void transform(struct students stu[],struct sexcode sexy[],struct collegecode colle[],int a,int b,int c); //录入

void namesort(struct students stu[],int a); //按照姓名排序

void averagesort(struct students stu[],int a); //平均分排序

void searchcollege(struct students stu[],int a); //按学院搜索学生

void namesearch(struct students stu[],int a); //按名字搜索

void printstudent(struct students stu[],struct sexcode sex[],struct collegecode colle[],int a,int b,int c); //输出

void change(struct students stu[],int a);

int passwordfun();

void passwordchange();

void averagefun(struct students stu[],int a);

struct students{

int num;

char name[];

int sexnum;

char sex[];

int collegenum;

char college[];

int score[];

float average;

};

struct sexcode{

int sexnum;

char sex[];

};

struct collegecode{

int collegenum;

char college[];

};

int main()

{

int a,b,c;

int choice;

struct students stu[];

struct sexcode sexy[];

struct collegecode colle[];

int t = passwordfun();

if(t == ){

printf("请使用正确密码重新登陆程序!\n");

return ;

}

while(){

system("cls");

printf("***********学生成绩系统菜单************ \n* 1. 原始文件读取 *\n* 2. 按姓名排序,输出 *\n* 3. 按平均成绩排序,输出 *\n* 4. 输出给定学院学生 *\n* 5. 修改给定学生成绩信息 *\n* 6. 按姓名查询学生,输出 *\n* 7. 修改系统密码 *\n* 0. 返回上一级菜单 *\n***************************************\n");

scanf("%d",&choice);

switch(choice){

case : system("cls");

a = readstudents(stu);

b = readsexcode(sexy);

c = readcollegecode(colle);

transform(stu,sexy,colle,a,b,c);

averagefun(stu,a);

printf("原始文件读取完毕!\n0. 返回上一级菜单 \n");

scanf("%d",&choice);

if(choice == ) break;

case : system("cls");

namesort(stu,a);

printstudent(stu,sexy,colle,a,b,c);

printf("\n0. 返回上一级菜单 \n");

scanf("%d",&choice);

if(choice == ) break;

case : system("cls");

averagesort(stu,a);

printstudent(stu,sexy,colle,a,b,c);

printf("\n0. 返回上一级菜单 \n");

scanf("%d",&choice);

if(choice == ) break;

case : system("cls");

searchcollege(stu,a);

printf("\n0. 返回上一级菜单 \n");

scanf("%d",&choice);

if(choice == ) break;

case : system("cls");

change(stu,a);

printf("修改成功!\n");

printf("\n0

  • 0
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值