/*要求:设立程序管理学生如下信息:学生学号、姓名、班级,语文、数学、英语成绩。
至少要有10名以上学生。
能够实现根据以下关键字查询:学生姓名 、学号、班级、课程名称。
能够实现按照单科成绩、总成绩、平均成绩、学号排序。
能够实现学生信息的插入、删除和修改。
能够查询每个课程的最高分、最低分及相应学生姓名、班级和学号。
能够查询每个班级某门课程的优秀率(90分及以上)、不及格率,并进行排序。*/
#include<iostream>
#include<iomanip>
#include<string>
using namespace std;
class student
{
int num;
char name[20];
char class1[20];
double chinese;
double math;
double english;
double youxiu;//优秀率
double bujige;//不及格率
double sum;//总成绩
double aver1;//平均成绩
public:
void set()
{
cout<<"\t学生学号:";
cin>>num;
cout<<"\t学生姓名:";
cin>>name;
cout<<"\t学生班级:";
cin>>class1;
cout<<"\t语文成绩:";
cin>>chinese;
cout<<"\t英语成绩:";
cin>>english;
cout<<"\t数学成绩:";
cin>>math;
}
void show()
{
cout<<"该学生的学号:"<<num<<endl;
cout<<"该学生的姓名:"<<name<<endl;
cout<<"该学生的班级:"<<class1<<endl;
cout<<"该学生的语文成绩:"<<chinese<<endl;
cout<<"该学生的数学成绩:"<<math<<endl;
cout<<"该学生的英语成绩:"<<english<<endl;
}
double ad(){return sum=chinese+english+math;}
double aver()
{
aver1=(chinese+english+math)/3;
return aver1;
}
friend void show();
friend void search();
friend void change();
friend void add();
friend void paixu();
friend void del();
};
void input();
void show();
void search();
void change();
void add();
void paixu();
void del();
student s[100];
int n=0;
int main()
{
int select;
while(1)
{
system("cls");
cout<<"\t ******************欢迎使用******************\n";
cout<<"\t **************学生成绩管理系统**************\n";
cout<<"\t *------------------------------------------*\n";
cout<<"\t * 1——录入学生信息 *\n";
cout<<"\t * 2——显示学生信息 *\n";
cout<<"\t * 3——查询学生信息 *\n";
cout<<"\t * 4——修改学生信息 *\n";
cout<<"\t * 5——添加学生信息 *\n";
cout<<"\t * 6——排序学生信息 *\n";
cout<<"\t * 7——删除学生信息 *\n";
cout<<"\t * 0——退出 *\n";
cout<<"\t *------------------------------------------*\n";
cout<<"\t
C++课程设计:学生成绩管理系统
最新推荐文章于 2024-06-18 09:38:54 发布