填空题：静态成员---计算学生个数

#include <iostream>
#include <string>
using namespace std;
class student
private:
string name;  //学生姓名
int age;      //学生年龄
int score;    //学生成绩
static int count; //记录学生对象个数
static int sum;  //记录所有学生的总成绩
public:
student(string n,int a,int s);  //构造函数
static int get_count();  //静态成员函数，获取count的值
static int get_sum();   //静态成员函数，获取sum的值
};

//将程序需要的成份写下来，只提交begin到end部分的代码
//******************** begin ********************
int student::count=0;
_____(1)_______;
________(2)___________
{
name=n;
age=a;
score=s;
count++;
sum+=s;
}
int student::get_count()
{
______(3)_______;
}
int student::get_sum()
{
______(4)______;
}
//********************* end ********************
int  main( )
{
string name;
int age;
int score;
int n;
cin>>n;  //输入学生对象个数
while(n--)
{
cin>>name>>age>>score;
new student(name,age,score);
}
cout<<"the count of student objects=";
cout<<student::get_count()<<endl;
cout<<"the sum of all students score=";
cout<<student::get_sum()<<endl;
return 0;
}

``````3
guo  34  98
zhang    56  60
li   23   87
``````

``````the count of student objects=3
the sum of all students score=245``````

``````
#include <iostream>
using namespace std;

class Student
{
public:
void input();
void sort();
void output();
private:
};

void Student::input()
{
for(int i=0;i<10;i++)
}

void Student::output()
{
for(int i=0;i<10;i++)
{
if(i==9)cout<<endl;
else cout<<' ';
}
}void Student::sort()
{
int i,j,k,t;
for(i=0;i<9;i++)
{
k=i;
for(j=i+1;j<10;j++)
}
}
int main()
{
Student GroupA;
GroupA.input();
GroupA.sort();
GroupA.output();
return 0;
}``````

``````
#include <iostream>
using namespace std;

class Student
{
public:
void input();
void sort();
void output();
private:
};

void Student::input()
{
for(int i=0;i<10;i++)
}

void Student::output()
{
for(int i=0;i<10;i++)
{
if(i==9)cout<<endl;
else cout<<' ';
}
}void Student::sort()
{
int i,j,k,t;
for(i=0;i<9;i++)
{
k=i;
for(j=i+1;j<10;j++)
}
}
int main()
{
Student GroupA;
GroupA.input();
GroupA.sort();
GroupA.output();
return 0;
}``````