没有合适的资源?快使用搜索试试~ 我知道了~
学生信息管理系统C语言版.doc
需积分: 9 0 下载量 84 浏览量
2022-07-15
08:52:38
上传
评论
收藏 68KB DOC 举报
温馨提示
![preview](https://dl-preview.csdnimg.cn/86209279/0001-81e093d01d558c0fc68fda05995a57d5_thumbnail-wide.jpeg)
![preview-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/scale.ab9e0183.png)
试读
18页
学生信息管理系统C语言版.doc
资源详情
资源评论
资源推荐
![](https://csdnimg.cn/release/download_crawler_static/86209279/bg1.jpg)
1
//交流学习
//QQ:1194758555
#include〈stdio。h>
#include〈string.h〉
#include〈stdlib。h>
#include<ctype。h>
#include〈windows。h〉
int k,n;
struct student
{
double yuwen;
double shuxue;
double yingyu;
double zong;
double pingjun;
char name[20];
char num[20];
} stu[1000];
void jiazai(struct student stu[],int *num1);
void baocun(struct student stu[],int n);
void find(struct student stu[],int n);
int findnum(struct student stu[],int n,char *num);//查找学号;
void shanchu(struct student stu[],int *num1);
void shanchuyi(struct student stu[],int *num1);//删除一条记录;
void shanchuquanbu(struct student stu[],int *num1);
void tianjiayi(struct student stu[],int i);//添加一记录;
void tianjia(struct student stu[],int *num1);//添加记录;
void xiugai(struct student stu[],int n);//修改一条记录;
void output(struct student stu[],int n,int x);//打印信息;
void paixu(struct student stu[],int n);//排序;
int jianchaxuehao(struct student stu[],char *num);//检查学号的合法
性;
int jianchachengji(double num);//检查成绩的合法性;
void outputone(struct student *stu,int i,int x);//输出一条信息
void caidan();
int main()
{
int q;
jiazai(stu,&n);
caidan();
scanf(”%d”,&q);
while(q〉6)
{
printf(”输入错误请重新输入 请输入 0—6 的数字”);
![](https://csdnimg.cn/release/download_crawler_static/86209279/bg2.jpg)
2
scanf(”%d",&q);
}
Sleep(300);
system("cls”);
switch(q)
{
case 1 :
tianjia(stu,&n);
break;
case 2:
xiugai(stu,n);
break;
case 3:
paixu(stu,n);
break;
case 4:
find(stu,n);
break;
case 5:
shanchu(stu,&n);
break;
case 6:
output(stu,n,0);
break;
case 0:
exit(0);
}
return 0;
}
void caidan()
{
printf("┌────────────────────────┐\n");
printf("├───────欢迎进入学生信息管理系统─────┤
\n");
printf("├────────────────────────┤\n");
printf(”│ 1 添加学生成绩 │
\n");
printf(”├────────────────────────┤
\n”);
printf("│ 2修改学生成绩 │\n”);
printf(”├────────────────────────┤\n");
printf("│ 3 排序 │
\n");
printf(”├────────────────────────┤\n");
![](https://csdnimg.cn/release/download_crawler_static/86209279/bg3.jpg)
3
printf("│ 4 查找 │
\n”);
printf("├────────────────────────┤\n”);
printf(”│ 5 删除 │
\n");
printf(”├────────────────────────┤
\n");
printf(”│ 6输出 │\n");
printf(”├────────────────────────┤\n”);
printf("│ 0 退出 │
\n");
printf("├────────────────────────┤\n");
printf("└────────────────────────┘\n");
printf("请输入选择:\n”);
}
void jiazai(struct student stu[],int *num1)
{
FILE *fp;
int i;
if((fp=fopen("d:\\student。dat”,"r”))==NULL)
{
*num1=0;
return;
}
for(i=0; fread(&stu[i],sizeof(struct student),1,fp)!=0; i++)
*num1=i;
fclose(fp);
}
void paixu(struct student stu[],int n)
{
int xuehao(const void *a,const void *b);
int yuwen(const void *a,const void *b);
int shuxue(const void *a,const void *b);
int yingyu(const void *a,const void *b);
int zongchengji(const void *a,const void *b);
int (*cmp[])(const void *a,const void *b)= {xuehao,yuwen,
shuxue,yingyu,zongchengji};
int a;
printf(”┌───────────────────────┐\n");
printf("│ 欢迎进入学生信息排序页面 │\n");
printf(”└───────────────────────┘\n");
printf(”┌───────────────────────┐\n");
printf("│ 0:按学号降序排序 │\n”);
printf("├───────────────────────┤\n");
剩余17页未读,继续阅读
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![gz](https://img-home.csdnimg.cn/images/20210720083447.png)
![pptx](https://img-home.csdnimg.cn/images/20210720083543.png)
![pptx](https://img-home.csdnimg.cn/images/20210720083543.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![txt](https://img-home.csdnimg.cn/images/20210720083642.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![xsl](https://img-home.csdnimg.cn/images/20210720083646.png)
![avatar](https://profile-avatar.csdnimg.cn/acfce43ffe2c41f996326bd927946824_yhsbzl.jpg!1)
智慧安全方案
- 粉丝: 3727
- 资源: 59万+
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助
![voice](https://csdnimg.cn/release/downloadcmsfe/public/img/voice.245cc511.png)
![center-task](https://csdnimg.cn/release/downloadcmsfe/public/img/center-task.c2eda91a.png)
最新资源
- wpf开发的一款播放器,可以设置多个屏幕,配置屏幕播放资源,音频的循环模式,图片的切换模式
- 金庸小说“雪山飞狐”电子书
- centos7系列 openssh9.8p1 rpm安装包
- Python基于Django框架+MySQL开发的个人博客系统(源码+数据库).zip
- DotwenPro v.1.0.380
- Jupyter入门练习-checkpoint(1).ipynb
- 自动驾驶研发平台集合业界优秀伙伴提供专业的自动驾驶研发工具
- openssh-98.tar.gz
- centos7 openssh9.8p1-openssl3.3.1.el7.x86-64 rpm包
- Sample Application to Prepare HLv2 Messages for Storing in MySQL
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback-tip](https://img-home.csdnimg.cn/images/20220527035111.png)
安全验证
文档复制为VIP权益,开通VIP直接复制
![dialog-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/green-success.6a4acb44.png)
评论0