c++大作业学生信息管理系统源代码(6)
时间:2025-03-10
时间:2025-03-10
c++大作业学生信息管理系统源代码
head=head->next;
}
if (b==1) cout<<"无此分数段的语文成绩记录!"<<endl;
}
//◆5(4)
void chashuxue(student *head) //查询数学成绩功能
{
int h,l,b=1;
cout<<"请输入您要查询的【数学】成绩的分数段: "<<endl;
cout<<"起始分 终止分"<<endl;
cin>>l; cin>>h;
cout<<"此分数段的学生数学成绩信息是:"<<endl;
cout<<"学号 姓名 班级 语文 数学 英语 总分 均分"<<endl;
while (head)
{
if ((head->maths>=l)&&(head->maths<=h))
{
b=0;
cout<<head->num<<" "<<head->name<<'\t'<<head->clas<<'\t'<<" "<<head->chinese<<'\t'
}
head=head->next;
}
if (b==1) cout<<"无此分数段的数学成绩记录!"<<endl;
}
//◆5(5)
void chayingyu(student *head) //查询英语成绩功能
{
int h,l,b=1;
cout<<"请输入您要查询的【英语】成绩的分数段: "<<endl;
cout<<"起始分 终止分"<<endl;
cin>>l; cin>>h;
cout<<"此分数段的学生英语成绩信息是:"<<endl;
cout<<"学号 姓名 班级 语文 数学 英语 总分 均分"<<endl;
while (head)
{
if ((head->english>=l)&&(head->english<=h))
{
b=0;
cout<<head->num<<" "<<head->name<<'\t'<<head->clas<<'\t'<<" "<<head->chinese<<'\t' <<head->maths<<'\t'<<head->english<<'\t'<<head->total<<'\t'<<setprecision(3)<<head->average<<endl;
上一篇:李君如谈建设学习型党组织