2018-11-20 回答
#include "stdio.h"
#include "stdlib.h"
#include "string.h"
#include "conio.h"
#define header1 " -----------------------------student------------------------------------- \n"
#define header2 " | number | name | chinese | math | english | sum | ave | mici | \n"
#define header3 " |---------------|----------------|----|----|----|-----|-------|----| "
#define format " | %-10s |%-15s |%4d|%4d|%4d|%4d | %.2f |%4d | \n"
#define data p->data.num,p->data.name,p->data.cgrade,p->data.mgrade,p->data.egrade,p->data.total,p->data.ave,p->data.mingci
#define end " ------------------------------------------------------------------------- \n"
int saveflag=0;
typedef struct student
{
char num[10]; /*学号*/
char name[20]; /*姓名*/
int cgrade; /*语文分数*/
int mgrade; /*数学分数*/
int egrade; /*英语分数*/
int total; /*总分*/
double aver; /*平均分*/
int mingci; /*名次*/
};
typedef struct node
{
struct student data;
struct node *next;
}node, *link;
int menu();
void printheader();
void printdata(node *pp);
void stringinput(char*t,int lens,char *notice);
int numberinput(char *notice);
void disp (link );
node* locate(link ,char findmess[],char nameornum[]);
void add(link );
void qur(link );
void del(link );
void modify(link );
void insert(link );
void tongji(link );
void sort(link );
void save(link );
int main()
{
return 0;
}