📄 lianbiao2.c
字号:
#include "stdlib.h"
#include "stdio.h"
#include "conio.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++)
{
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;
}
getch();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -