#include
struct LinkNode
{
int value;
LinkNode * next;
};
int main()
{
LinkNode * pHead = NULL;
LinkNode * curPoint = NULL;
int i;
for(i=0;i<5;i++)
{
LinkNode* pLinenode = new LinkNode;
scanf("%d",&pLinenode->value);
if(curPoint != NULL)
{
curPoint->next = pLinenode;
curPoint = pLinenode;
}
else
{
curPoint = pLinenode;
pHead = curPoint;
}
}
curPoint = pHead;
for(i = 0;i< 5;i++)
{
printf("%d\t",curPoint->value);
curPoint= curPoint->next;
}
printf("\n");
return 0;
}