回 帖 发 新 帖 刷新版面

主题:教务管理系统C语言源代码


#include <stdio.h>
#include <conio.h>
#include <ctype.h>
#include <stdlib.h>

#define MAX 10
#define N 20
#define M 10

void by_name(struct CLASS *headp);
void by_number(struct CLASS *headp);
void by_age(struct CLASS *headp);
void by_tel(struct CLASS *headp);
void write_file(struct CLASS *headp,FILE *myfile);
float SUBAVE(struct CLASS *headp,int,int,int);
void CLAAVE(struct CLASS *headp);
void incredit(struct CLASS *headp);
void sort(struct CLASS *headp);
void method(void);
void WarnCLA();
void WarnSTU();
void WarnSUB();
void SUCESSES();
void out(struct CLASS *headp,int,int);
void introduce(void);
void screen(int,int,int,char *p[]);
struct CLASS * read_file(struct CLASS *headp,FILE *myfile);
struct CLASS * create(struct CLASS *headp);
struct CLASS * mod_stu(struct CLASS *headp);
struct CLASS * mod_sbj(struct CLASS *headp);
struct CLASS * mod_score(struct CLASS *headp);
struct CLASS * mod_STUkey(struct CLASS *headp);
struct CLASS * del_sbj(struct CLASS *headp);
struct CLASS * del_stu(struct CLASS *headp);
struct CLASS * del_cla(struct CLASS *headp);
struct CLASS * ins_cla(struct CLASS *headp);
struct CLASS * ins_stu(struct CLASS *headp);
struct CLASS * ins_sbj(struct CLASS *headp);


struct STUD{                 /*学生结构体*/
   long number;               
   unsigned subjects;
   unsigned age;
   float average;
   char STUkey[12];
   char name[N];
   char kind[M];
   char sex[M];
   char bir_p[N];
   char add[N];
   long tel;
   char  mobilephone[15];
   struct STUD* next;
   struct SUB* first;
  };

struct CLASS{                /*班级结构体*/  
   unsigned no;
   unsigned students;
   unsigned classes;
   char ADMkey[12];
   float score[MAX];
   float average;
   struct STUD* first;
   struct CLASS* next;
};

struct SUB{                   /*课程结构体*/
   unsigned number;
   char name[N];
   unsigned credit;
   unsigned ps_score;
   unsigned tx_score;
   unsigned un_score;
   struct SUB* next;
};


FILE *fp;

int key0,key1,key,test,dx,dy,y,x,i;               /*外部变量说明*/
char   buf[30*10*2],buf1[30*2];

char   *chp[ ]= {"file",                         /* 菜单项目*/
        "search",
        "insert",
        "modify",
        "delete",
        "tongji",
        "help",
                "outby",
        };

char * file[]={
           "create",
           "open ",
           "save ",
           "exit ",
};
char * search[]={
           "by name",
           "by number",
           "by tel",
           "by age",
};
char * insert[]={
           "student",
           "subject",
           "class",
           "Copy",
};
char * modify[]={
            "student",
           "subject",
           "score  ",
           "STUkey",
};
char * delete[]={
            "student",
           "subject",
           "class",
           "xxxxxx",
};
char * tongji[]={
           "SUBAVE",
           "impass",
           "incredit",
           "output",
};
char * help[]={
           "introduct",
           "method",
       "sort  ",
           "CLAAVE",
};
char *  outby[]={
           "Best",
           "Good",
       "Middle",
           "Bad  ",
};

回复列表 (共57个回复)

21 楼

果然是高手!

22 楼

太好了!收藏!学习!

23 楼

强人啊 佩服.看来以后还要好好学啊,要不然就掉队了哦

24 楼

里面代码写的很混乱,很多算法不简洁,不过代码实在是太长了,以至于缺点被掩盖,大家过奖了,之所以贴出来,只是想给暑假做课设的同学一个参考.

25 楼

真牛!佩服万分!

26 楼

大哥,怎么不能运行?

27 楼

如果你是用TC的话,因为代码太长,可能不能够编译,你可以去掉注释,如果是在VC6.0环境下编译就不存在问题的啊

28 楼

你 花了多长时间弄出来啊!
是不是先流程图写好了,再慢慢写函数?

29 楼

当时还没有这种意识,只是先写,然后慢慢扩充的.

30 楼

你不累啊,打个包上传不就更好吗

我来回复

您尚未登录,请登录后再回复。点此登录或注册