各位大哥大姐小弟急求“C语言成绩查询系统”望大家帮帮忙

来源:百度知道 编辑:UC知道 时间:2024/06/06 10:48:07
要求很简单的,只要有成绩录入及查询就行了
小弟刚刚注册的,所以没分悬赏,请大家办个忙
不要太复杂了,简单点的好

#include <stdio.h>
#include <string.h>
#include <process.h>

struct grade
{
char name[20], ID[10]
int maths, english, physics;
grade *next;
};
grade *CreateList()
{
grade *head = NULL, *temp = NULL, *tail;
printf("输入学生成绩信息,在学号处输入-1结束输入。\n\n");
while(1)
{
temp = new grade;
printf("输入学号:");
scanf("%s", temp->ID);
if(!strcmp(temp->ID, "-1"))
{
delete temp;
break;
}
printf("输入姓名:");
scanf("%s", temp->name);
printf("输入数学成绩:");
scanf("%d", &temp->maths);
printf("输入英语成绩:");
scanf("%d", &temp->english);
printf("输入物理成绩:");
scanf("%d", &temp->physics);
if(head == NULL)
{
head = temp;
head->next = NULL;