Run ID:267
提交时间:2022-07-24 10:38:17
#include<iostream> using namespace std; struct node { int data; node *next; }*head,*rear; int main() { head=new node; head->next=NULL; rear=head; int x; cin>>x; while(x!=0) { node *p=new node; p->data=x; p->next=NULL; rear } return 0; }