文章
2
粉丝
418
获赞
0
访问
17.4k
#include<stdio.h>
#include<malloc.h>
#define LN sizeof(struct Note)
struct Note{
int qaq;
struct Note *next;
};
struct Note *create(int *x){
struct Note *head,*p1,*p2;
p1=p2=(struct Note *)malloc(LN);
p1->qaq=x[0];head=p1;int i;
for(i=1;i<=5;i++){
p2->next=p1;p2=p1;
p1=(struct Note *)malloc(LN);
p1->qaq=x[i];
}
p2->next=NULL;
return(head);
}
void print(struct Note *head){
struct Note *p;p=head;
for(;p!=NULL;){
printf("%d ",p->qaq);
p=p->next;
}
}
int main(){
int a[5],i,j,min,t;
...
登录后发布评论
暂无评论,来抢沙发