📄 ysf.cpp
字号:
#include <stdio.h>
#include <stdlib.h>
typedef struct node
{
int num;
int password;
struct node *next;
}node, *LinkList;
InitList(node *p)
{
p=(node *)malloc(sizeof(node));
p->next=NULL;
}
void main()
{
node *p, *s;
int NumV;
int PasswordV;
int i;
InitList(p);
for(i=0;i<3;i++)
{
printf("Please enter the Number of the people:");
scanf("%d",&NumV);
printf("Please enter the Password of the people:");
scanf("%d",&PasswordV);
s=(node *)malloc(sizeof(node));
printf("!!%d",s->num);
printf("%d",s->password);
s->num=NumV;
//printf("!!!!!!");
//printf("%d",s->num);
s->password=PasswordV;
//printf("!!!!!!");
//printf("%d",s->password);
s->next=p->next;
p->next=s;
}
for(i=0;i<3;i++)
{
printf("The number of %d people is %d",i,p->num);
printf("The password of %d people is %d",i,p->password);
p=p->next;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -