文章
2
粉丝
12
获赞
1
访问
1.4k
#include<stdio.h> #include<malloc.h> struct node{ int num; struct node *next; }; int n,s,m; struct node *create(){ struct node *head,*pre,*now; for(int i=1;i<=n;i++){ now=(struct node*)malloc(sizeof(struct node)); if(i==1){ head=now; pre=now; } now->num=i; now->next=head; pre->next=now; pre=now; } return head; }; void print(struct node *head){ int i=1; struct node *p=head; s=s-1; while(s--){ p=p->next; } while(p!=NULL){ if(p->...
登录后发布评论
暂无评论,来抢沙发