#include <iostream>
#include <cstring>
#include <algorithm>
using namespace std;
struct ps
{
int n;
ps *pNext;
};
int main()
{
ps *New;
ps *p=NULL;
cout<<"请输入案例个数:";
int t;
cin>>t;
for(int i=1;i<=t;i++)
{
cout<<"请输入一个整数:";
int n;
cin>>n;
New=(ps*)malloc(sizeof(ps));
New->n=n;
New->pNext=NULL;
if(p==NULL)
{
p=New;
p->pNext=NULL;
}
else
{
ps *tail=p;
while(tail->pNext!=NULL)
{
tail=tail->pNext;
}
tail->pNext=New;
}
}
ps *tail=p;
while(tail!=NULL)
{
cout<<tail->n<<endl;
tail=tail->pNext;
}
delete p;
p=NULL;
return 0;
}