回 帖 发 新 帖 刷新版面

主题:教务管理系统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个回复)

41 楼

强!
看来以后我还要多多努力学习呀!

42 楼

我也觉得有位cuiweican同志说得有道理啊,你这么一张一张的贴上来,,有些前后都不一致,,怎么看啊,你自己看啊,你的第一页和第二页的代码都不一样,,东西都还没有些完如第11楼的密码验证也没有就IN2了,读程序嘛,又不是搞破翻~~~你传份完整的有顺序的上来行吗???

43 楼

好,收藏啦!!谢谢!!

44 楼

代码很好,非常感谢,可不可以成为朋友?

45 楼

收藏了!!!!!!

46 楼

经管我还没有试,不过我愿意先顶一下,以后有这样的好东西多发一下啊,呵呵,早点看到这个的话,我去年就不会那么惨!

47 楼

很不错

48 楼


[em1]

可以加点说明之类的吗?……收藏了!

49 楼

有多少行的?

50 楼

强人   能否大致的讲一下  模块组合啊   画个流程什么的   让大家更好的分享啊

我来回复

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