#include "stdio.h"

来源:互联网 发布:常用的外文文献数据库 编辑:程序博客网 时间:2024/04/29 17:15
#include "stdlib.h"
#include "stdio.h"
struct list
{ int data;
struct list *next;
};
typedef struct list node;
typedef node *link;
void main()
{ link ptr,head;
int num,i;
ptr=(link)malloc(sizeof(node));
ptr=head;
printf("please input 5 numbers==>\n");
for(i=0;i<=4;i++)
{

  


http://www.zznews.cn/hyzx/jkxx/5451672959.html
http://www.zznews.cn/hyzx/jkxx/5451688330.html
http://www.rznews.cn/yszx/stbk/5482712213.html
http://www.zznews.cn/hyzx/jkxx/5451690985.html
http://www.rznews.cn/yszx/stbk/5474988677.html
http://www.rznews.cn/yszx/stbk/5474508372.html



}scanf("%d",&num);

  ptr->data=num;
  ptr->next=(link)malloc(sizeof(node));
  if(i==4) ptr->next=NULL;
  else ptr=ptr->next;
}
ptr=head;
while(ptr!=NULL)
{ printf("The value is ==>%d\n",ptr->data);
  ptr=ptr->next;
}
}
0 0
原创粉丝点击