非本人:
#include <iostream>
using namespace std;
struct node{
int x;
string name;
int score;
node*next;
};
int main()
{
node*head,*tail,*temp;
head=new node;
head->next=nullptr;
tail=head;
while(1)
{
string name;
int x,score;
cin>>x>>name>>score;
if(x==0)break;
temp=new node;
temp->x=x;
temp->name=name;
temp->score=score;
temp->next=nullptr;
tail->next=temp;
tail=temp;
}
node*p=head;
for(p=head->next;p!=nullptr;p=p->next)
{
cout<<p->x<<" "<<p->name<<" "<<p->score<<endl;
}
return 0;
}