#include<iostream>
using namespace std;
class student
{
public:
student(int n, float s) :num(n), score(s)
{
}
void display(void);
private:
int num;
float score;
};
void student::display(void)
{
cout << num << ":" << score<<endl;
}
int main()
{
student stu[5] = { student(101,78.5),student(102,85.5),student(103,98.5),student(104,100.0),student(105,95.5) };
student* p = stu;
//student s[1] = { student(101,78.5) };
for (;p<stu+5; p = p + 2)
{
p->display();
}
return 0;
}