![](https://video.ask-data.xyz/img.php?b=https://iknow-pic.cdn.bcebos.com/d4628535e5dde71197260350aaefce1b9c16619b?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto)
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
struct node
{ int num;
node* next;
}*h,*p;
node *creat()
{ node*h,*p,*q,*q1;
int x,i;
h=(node*)malloc(sizeof(node));
h->next=NULL;
for(i=0;i<10;i++)
{scanf("%d",&x);
q=(node*)malloc(sizeof(node));
q->num=x;
q1=h;
for(p=h->next;p&&p->num<x;p=p->next)q1=p;
q->next=q1->next;
q1->next=q;
}
return h;
}
int main()
{ h=creat();
for(p=h->next; p; p=p->next)
printf("%d ",p->num);
return 0;
}