#include<iostream>
#include<stdlib.h>
#include<queue>
#include<cstring>
using namespace std;
class Cstudent{
private:
int numb,score;
string name;
public:
void getIn(int n){
numb=n;
cin>>name>>score;
}
void getOut(){
cout<<numb<<" "<<name<<" "<<score;
}
};
int main(){
int n;
Cstudent stu,p;
queue<Cstudent>Q;
do{
cin>>n;
if(n){
stu.getIn(n);
Q.push(stu);
}else{
break;
}
}while(1);
while(!Q.empty()){
p=Q.front();
p.getOut();
cout<<endl;
Q.pop();
}
return 0;
}
7-1 学生信息输入输出分数 10
最新推荐文章于 2023-12-21 15:22:57 发布