#include#include #include typedef struct Node{ int data; struct Node *next;}NODE;void Create_List(NODE *L){ int n; NODE *p,*r; r=L; scanf("%d",&n); while(1) { if(n<0) break; p=(NODE*)malloc(sizeof(NODE)); p->data=n; p->next=r->next; r->next=p; r=p; scanf("%d",&n); }}void DispList(NODE *L){ NODE *p=L->next; while(p!=NULL) { printf("%d ",p->data); p=p->next; }}void Rise(NODE *L){ NODE *pre,*p=L->next; NODE *r=p->next; p->next=NULL; p=r; while(p!=NULL) { r=p->next; pre=L; while(pre->next!=NULL&&pre->next->data data) pre=pre->next; p->next=pre->next; pre->next=p; p=r; }}void main(){ NODE *L; L=(NODE*)malloc(sizeof(NODE)); L->next=NULL; printf("创建链表:\n"); Create_List(L); printf("链表如下:\n"); DispList(L); Rise(L); printf("增序后的链表:\n"); DispList(L); printf("\n");}