📄 emp4_17.cpp
字号:
// emp4_17
#include "linklist.h"
static link p,q;
sptrlink pt,qt;
boolean judge(link l)
{
boolean bb;
p=l->next;
q=p->next;
bb=true;
while ((q!=NULL) && bb){
sptr_point_to(pt,p);
sptr_point_to(qt,q);
getch();
if (p->data+2==q->data){
p=q;
q=q->next;
}else bb=false;
}
return bb;
}
void main()
{
link l;
create_hsllist(l);
display_hsllist("llist",l);
create_sptr(pt,"P");
create_sptr(qt,"Q");
disp_hsllist("llist",l);
if (judge(l)) printf("True!\n");
else printf("False!\n");
getch();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -