没有合适的资源?快使用搜索试试~ 我知道了~
关于学生成绩管理系统的C语言文件
需积分: 9 2 下载量 166 浏览量
2009-11-27
17:30:08
上传
评论
收藏 9KB TXT 举报
温馨提示
试读
7页
改程序时使用C语言编写的关于学生成绩管理的一部分,下一部分待传
资源推荐
资源详情
资源评论
#include "stdio.h" /*I/O函数*/
#include "stdlib.h" /*其它说明*/
#include "string.h" /*字符串函数*/
#include "conio.h" /*屏幕操作函数*/
#include "mem.h" /*内存操作函数*/
#include "ctype.h" /*字符操作函数*/
#include "alloc.h" /*动态地址分配函数*/
#define N 3 /*定义常数*/
typedef struct z1 /*定义数据结构*/
{ char no[11];
char name[15];
int score[N];
float sum;
float average;
int order;
struct z1 *next;
}STUDENT;
/*菜单函数,返回值为整数*/
menu_select()
{
char *menu[]={" ***************MENU***************", /*定义菜单字符串数组*/
" 0. Init list", /*初始化*/
" 1. Enter list", /*输入记录*/
" 2. Print list ", /*显示单链表中所有记录*/
" 3. Sort to make new file", /*排序*/
" 4. Search record on name", /*按照姓名查找记录*/
" 5. Insert record to list ", /*插入记录到表中*/
" 6. Delete a record from list", /*从表中删除记录*/
" 7. Save the file", /*将单链表中记录保存到文件中*/
" 8. Load the file", /*从文件中读入记录*/
#include "stdlib.h" /*其它说明*/
#include "string.h" /*字符串函数*/
#include "conio.h" /*屏幕操作函数*/
#include "mem.h" /*内存操作函数*/
#include "ctype.h" /*字符操作函数*/
#include "alloc.h" /*动态地址分配函数*/
#define N 3 /*定义常数*/
typedef struct z1 /*定义数据结构*/
{ char no[11];
char name[15];
int score[N];
float sum;
float average;
int order;
struct z1 *next;
}STUDENT;
/*菜单函数,返回值为整数*/
menu_select()
{
char *menu[]={" ***************MENU***************", /*定义菜单字符串数组*/
" 0. Init list", /*初始化*/
" 1. Enter list", /*输入记录*/
" 2. Print list ", /*显示单链表中所有记录*/
" 3. Sort to make new file", /*排序*/
" 4. Search record on name", /*按照姓名查找记录*/
" 5. Insert record to list ", /*插入记录到表中*/
" 6. Delete a record from list", /*从表中删除记录*/
" 7. Save the file", /*将单链表中记录保存到文件中*/
" 8. Load the file", /*从文件中读入记录*/
" 9. Quit", /*退出*/
" ",
" ", /*屏幕调节,没有实际意义*/
" ",
" ***********************************",
" ",
" ",};
char s[3]; /*以字符形式保存选择号*/
int c,i; /*定义整形变量*/
textbackground(BLUE); /*设置背景颜色为蓝色*/
gotoxy(1,25); /*移动光标*/
printf("Press any key enter menu......\n"); /*压任一键进入主菜单*/
getch(); /*输入任一键*/
clrscr(); /*清屏*/
for(i=0;i<16;i++) /*输出主菜单数组*/
{ gotoxy(10,i+1);
cprintf("%s",menu[i]);
}
window(1,1,80,25); /*恢复原窗口大小*/
gotoxy(10,21); /*移动光标*/
do{printf("\n Enter you choice(0~9):"); /*在菜单窗口外显示提示信息*/
scanf("%s",s); /*输入选择项*/
c=atoi(s); /*将输入的字符串转化为整形数*/
}while(c<0||c>9); /*选择项不在0~9之间重输*/
return c; /*返回选择项,主程序根据该数调用相应的函数*/
}
/*初始化链表,可以实现对另一组数据的处理*/
STUDENT *init() /*初始化链表*/
" ",
" ", /*屏幕调节,没有实际意义*/
" ",
" ***********************************",
" ",
" ",};
char s[3]; /*以字符形式保存选择号*/
int c,i; /*定义整形变量*/
textbackground(BLUE); /*设置背景颜色为蓝色*/
gotoxy(1,25); /*移动光标*/
printf("Press any key enter menu......\n"); /*压任一键进入主菜单*/
getch(); /*输入任一键*/
clrscr(); /*清屏*/
for(i=0;i<16;i++) /*输出主菜单数组*/
{ gotoxy(10,i+1);
cprintf("%s",menu[i]);
}
window(1,1,80,25); /*恢复原窗口大小*/
gotoxy(10,21); /*移动光标*/
do{printf("\n Enter you choice(0~9):"); /*在菜单窗口外显示提示信息*/
scanf("%s",s); /*输入选择项*/
c=atoi(s); /*将输入的字符串转化为整形数*/
}while(c<0||c>9); /*选择项不在0~9之间重输*/
return c; /*返回选择项,主程序根据该数调用相应的函数*/
}
/*初始化链表,可以实现对另一组数据的处理*/
STUDENT *init() /*初始化链表*/
剩余6页未读,继续阅读
资源评论
wp131425
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功