📄 createchainbelt.cpp
字号:
#include"chainbelth.h"
void Createlist(linklist &l)
{
int i,number;
linklist p;
printf("Please input a data indicate the length of the chain belt which you want to create:\n");
printf("Please input the number of the datas:\n");
printf("number=");
scanf("%d",&number);
printf("please input the datas you want to create the chain belt:\n");
for(i=number;i>0;--i)
{
p=(linklist)malloc(sizeof(Lnode));
if(!p)
printf("Error! Not have enough EMS memory interspace!\n");
scanf("%d",&p->data);
p->next=l->next;
l->next=p;
}
printf("The chain belt is:\n");
printout(l);
printf("\n");
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -