📄 test02_3.cpp
字号:
// test02_3
#include "linklist.h"
link L1,L2,L3:link;
void Interset(link &L1,link &L2,link &L3)
{
link P1,P2,R,S;
R=(link)malloc(sizeof(struct node));
_______________________ //Blank 6
P1=L1->next;
P2=L2->next;
while ((P1!=NULL) && (P2!=NULL))
{
visite_snode(P1,1);
visite_snode(P2,2);
Wait();
if (P1->data<P2->data)
__________________//Blank 7
else
if (P1->data>P2->data)
____________________ //Blank 8
else{
S=(link)mallco(sizeof(struct node));
S->data=P1->data;
S->next=NULL;
__________________________//Blank 9
P1=P1->next;
P2=P2->next;
comput_sllist_card(l3,50,400);
disp_hsllist("Interset",l3);
}
}
}
void main()
{
get_hsllist(L2);
comput_sllist_card(l2,50,250);
disp_hsllist("L2",L2);
get_hsllist(L1);
comput_sllist_card(l1,50,100);
disp_hsllist("L1",L1);
Interset(L1,L2,L3);
comput_sllist_card(l3,50,400);
disp_hsllist("Interset",l3);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -