高分 求助一个用C语言编写的“学生学籍管理系统” 100
学生学籍管理系统,主要包括成绩的录入,显示,查询和统计四大模块,各主要模块的功能如下:1,录入模块通过键盘录入全班同学三门课程的成绩;2,显示模块显示所有录入的成绩;3,...
学生学籍管理系统,主要包括成绩的录入,显示,查询和统计四大模块,各主要模块的功能如下:
1,录入模块 通过键盘录入全班同学三门课程的成绩;
2,显示模块 显示所有录入的成绩;
3,查询模块 查询相关同学的成绩;
4,统计模块 统计各门课程和每个同学的平均分,排序并打印前三名 展开
1,录入模块 通过键盘录入全班同学三门课程的成绩;
2,显示模块 显示所有录入的成绩;
3,查询模块 查询相关同学的成绩;
4,统计模块 统计各门课程和每个同学的平均分,排序并打印前三名 展开
3个回答
展开全部
800快
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
忒难了~~找个高手来呗~~
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
#include<stdio.h>
#define LEN sizeof(struct student)
struct student
{long num;
float score[3];
float average;
struct student *next;
};
int n;
struct student*creat()/*录入模块*/
{struct student *head,*p1,*p2;
n=0;head=NULL;
p1=(struct student*)malloc(LEN);
scanf("%ld,%f,%f,%f",&p1->num,&p1->score[0],&p1->score[1],
&p1->score[2]);p1->next=NULL;
while(p1->num!=0)
{++n;
if(n==1)head=p1;
else p2->next=p1;
p2=p1;
p1=(struct student *)malloc(LEN);
scanf("%ld,%f,%f,%f",&p1->num,&p1->score[0],&p1->score[1],
&p1->score[2]);
p1->next=NULL;
}
free(p1);
return(head);
}
void print(struct student *head)/*显示模块*/
{struct student *p;
printf("\nNow,These %d nodes are:\n",,n);
p=head;
if(head!=NULL)
do
{printf("%ld %5.2lf %5.2lf %5.2lf\n",p->num,p1->score[0],
p1->score[1],p1->score[2]);
p=p->next;
}while(p!=NULL);
}
struct student *find(struct student *head,long num)/*查询模块*/
{if(head==NULL)
{frintf("\nlist null!\n");
goto end;
}
p1=head;
while(num!=p1->num&&p1!=NULL)
{p2=p1;p1=p1->next;}
if(p1=NULL)
printf("find:%ld %5.2lf %5.2lf %5.2lf\n",num,p1->score[0],
p1->score[1],p1->score[2]);
else
printf("%ld not been found!\n",num);
end;
return(head);
}
void average(struct student *head)/*统计模块*/
{struct student *p;
p=head;
if(head!=NULL)
do{p->average=(p->score[0]+p->score[1]+p->score[2])/3;
printf("%ld %5.2lf",p->num,p->average);
}while(p!=NULL);
}
void main()
{
long num;
creat();
print(head);
scanf("%ld",num);/*输入要查询的学生学号*/
find(head,num);
average(head);
}
#define LEN sizeof(struct student)
struct student
{long num;
float score[3];
float average;
struct student *next;
};
int n;
struct student*creat()/*录入模块*/
{struct student *head,*p1,*p2;
n=0;head=NULL;
p1=(struct student*)malloc(LEN);
scanf("%ld,%f,%f,%f",&p1->num,&p1->score[0],&p1->score[1],
&p1->score[2]);p1->next=NULL;
while(p1->num!=0)
{++n;
if(n==1)head=p1;
else p2->next=p1;
p2=p1;
p1=(struct student *)malloc(LEN);
scanf("%ld,%f,%f,%f",&p1->num,&p1->score[0],&p1->score[1],
&p1->score[2]);
p1->next=NULL;
}
free(p1);
return(head);
}
void print(struct student *head)/*显示模块*/
{struct student *p;
printf("\nNow,These %d nodes are:\n",,n);
p=head;
if(head!=NULL)
do
{printf("%ld %5.2lf %5.2lf %5.2lf\n",p->num,p1->score[0],
p1->score[1],p1->score[2]);
p=p->next;
}while(p!=NULL);
}
struct student *find(struct student *head,long num)/*查询模块*/
{if(head==NULL)
{frintf("\nlist null!\n");
goto end;
}
p1=head;
while(num!=p1->num&&p1!=NULL)
{p2=p1;p1=p1->next;}
if(p1=NULL)
printf("find:%ld %5.2lf %5.2lf %5.2lf\n",num,p1->score[0],
p1->score[1],p1->score[2]);
else
printf("%ld not been found!\n",num);
end;
return(head);
}
void average(struct student *head)/*统计模块*/
{struct student *p;
p=head;
if(head!=NULL)
do{p->average=(p->score[0]+p->score[1]+p->score[2])/3;
printf("%ld %5.2lf",p->num,p->average);
}while(p!=NULL);
}
void main()
{
long num;
creat();
print(head);
scanf("%ld",num);/*输入要查询的学生学号*/
find(head,num);
average(head);
}
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询