学生成绩信息管理。

来源:百度知道 编辑:UC知道 时间:2024/05/15 09:05:57
实现简单的学生成绩信息管理软件。 学生信息包括:学号、姓名、4门课程的成绩(计算机,数学,英语,物理)。 要实现的功能:学生信息的录入、修改、删除和查询。

这么抠啊,一点分都不给,谁会回答你啊! 不过本人心好,把自己写的送你了

#include<stdio.h>
#include<string.h>
#define NULL 0
struct node
{ char num[5];
char name[10];
int score[4];
struct node *next;
};

void select(struct node *p,char *t)
{ int i,flag=0;
struct node *q;
q=p->next;
while(q)
{ if(strcmp(q->num,t)==0)
{ flag=1;
break;
}
else
q=q->next;
}
if(flag)
{ printf("The student data is:\n");
printf("%s ",q->num);
printf("%s ",q->name);
for(i=0;i<4;i++)
printf("%d ",q->score[i]);
printf("\n");
}
else
printf("\nDon't found the student!");
}

void delete(struct node *p,char *t)
{ int i,flag=0;
struct node *q,*w;
q=p->next; w=p->next;
while(q)
{ if(