最近学校的学生统计系统坏了,于是乎,我在经历了无数个bug后,写出了12.10版本的学生信息统计,代码如下:(老师估计挺喜欢)
#include#include #include #include using namespace std; void color(short x) { if(x>=0&&x<=15) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),x); } struct colorParameters {//颜色调整结构体 short frame=8;//边框颜色色号 short title=9;//标题颜色色号 short option=3;//正文颜色色号 short tacit=15;//默认颜色色号 short message=4;//信息预览颜色色号 short warning=4;//警告颜色色号 }; colorParameters ers; class Operation { private: int number; public: void charge(int people); void inputPeople(); void inputAchievement(); void output(); int total(); void sorting(); void SortingNoOutput(); void lookup(int max,int low); void replace1(int n); void replace2(int n); void clean(); void maximal(); void average(); }; struct student { int num; string name; }; student stu[10000]; struct achievement { float score; }; achievement ach[10000]; struct seqencing { int num; string name; float score; }; seqencing seq[10000]; struct numb { int num; string name; float score; }; numb num; struct maxValue { int num; string name; float score; }; maxValue lue; struct mean { int num; }; mean ean; void Operation::charge(int people) { number=people; } void Operation::inputPeople() { for(int i=0; i >stu[i].num>>stu[i].name; } cout<<"输入完毕,正在跳转至主页面"; Sleep(0.5*1000); } void Operation::inputAchievement() { for(int i=0; i >ach[i].score; } cout<<"输入完毕,正在跳转至主页面"; Sleep(0.5*1000); } void Operation::output() { for(int i=0; i stu[n-1].num>>stu[n-1].name; cout<<"替换完毕,正在跳转至主页面"; } void Operation::replace2(int n) { cout<<"替换前:"< ach[n-1].score; cout<<"替换完毕,正在跳转这主页面"; } void Operation::clean() { for(int i=0; i


