没有合适的资源?快使用搜索试试~ 我知道了~
学生成绩管理系统
资源推荐
资源详情
资源评论
#include <stdio.h> /*头文件说明*/
#include<dos.h>
#include<stdlib.h>
#include<string.h> /*字符串函数*/
#include<mem.h> /*内存操作函数*/
#include<ctype.h> /*字符操作函数*/
#include<alloc.h> /*动态地址分配函数*/
#define L sizeof(S)
typedef struct stu /*定义结构体数组用于缓存数据*/
{char num[6];
char name[5];
int score[3];
int sum;
float average;
int order;
struct stu *next;
}S;
/*各函数声明*/
S *initiate(); /*初始化函数*/
int menu_select(); /*菜单函数*/
S *create(); /*创建链表*/
void print(S *head); /* 显示全部记录*/
void search(S *head); /*查找记录*/
S *delete(S *head); /*删除记录*/
S *sort(S *head); /*排序*/
S *insert(S *head,S *new); /*插入记录*/
void save(S *head); /*保存文件*/
S *load(); /*读文件*/
#include<dos.h>
#include<stdlib.h>
#include<string.h> /*字符串函数*/
#include<mem.h> /*内存操作函数*/
#include<ctype.h> /*字符操作函数*/
#include<alloc.h> /*动态地址分配函数*/
#define L sizeof(S)
typedef struct stu /*定义结构体数组用于缓存数据*/
{char num[6];
char name[5];
int score[3];
int sum;
float average;
int order;
struct stu *next;
}S;
/*各函数声明*/
S *initiate(); /*初始化函数*/
int menu_select(); /*菜单函数*/
S *create(); /*创建链表*/
void print(S *head); /* 显示全部记录*/
void search(S *head); /*查找记录*/
S *delete(S *head); /*删除记录*/
S *sort(S *head); /*排序*/
S *insert(S *head,S *new); /*插入记录*/
void save(S *head); /*保存文件*/
S *load(); /*读文件*/
/*主函数界面*/
main()
{S *head,new;
head=initiate(); /*链表初始化,使head的值为NULL*/
for(;;) /*循环无限次*/
{switch(menu_select())
{
case 1:head=create();break;
case 2:print(head);break;
case 3:search(head);break;
case 4:head=delete(head);break;
case 5:head=sort(head);break;
case 6:head=insert(head,&new);break; /*&new表示返回地址*/
case 7:save(head);break;
case 8:head=load(); break;
case 9:exit(0); /*如菜单返回值为9则程序结束*/
}
}
}
/*初始化函数*/
S *initiate()
{
return NULL; /*返回空指针*/
}
/*菜单选择函数*/
menu_select()
{int n;
struct date d; /*定义时间结构体*/
main()
{S *head,new;
head=initiate(); /*链表初始化,使head的值为NULL*/
for(;;) /*循环无限次*/
{switch(menu_select())
{
case 1:head=create();break;
case 2:print(head);break;
case 3:search(head);break;
case 4:head=delete(head);break;
case 5:head=sort(head);break;
case 6:head=insert(head,&new);break; /*&new表示返回地址*/
case 7:save(head);break;
case 8:head=load(); break;
case 9:exit(0); /*如菜单返回值为9则程序结束*/
}
}
}
/*初始化函数*/
S *initiate()
{
return NULL; /*返回空指针*/
}
/*菜单选择函数*/
menu_select()
{int n;
struct date d; /*定义时间结构体*/
剩余11页未读,继续阅读
资源评论
RyanYin
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功