#include<iostream>
#include <iomanip>
using namespace std;
class Student
{
public :
void display()
{
cout<<num<<" "<<score<<endl;
}
void input()
{
cin>>num;
cin>>score;
}
private:
int num;
double score;
};
int main()
{
const int NUM=10;
Student stud[NUM];
int n,i;
cin>>n;
for(i=0; i<n; i++)
stud[i].input();
cout<<setiosflags(ios::fixed);
cout<<setprecision(2);
Student *p=stud;
for(i=0; i<n; p+=2,i+=2)
p->display();
return 0;
}
OJ11
最新推荐文章于 2024-03-17 16:01:12 发布