帮忙翻译下面一段程序2(周一前完成)多谢

来源:百度知道 编辑:UC知道 时间:2024/07/07 05:11:21
main()
{
ElemType e;
sqlist La,Lb,Lc;
clrscr();
printf("\n\n-------------------List Demo is running...----------------\n\n");
printf("First is InsertList function.\n");
init(&La);
e='a';
ListInsert(&La,1,e);
e='b';
ListInsert(&La,2,e);
printlist(La);
printf("List A length now is %d.\n\n",La.length);
getch();
e='f';
ListInsert(&La,3,e);
e='9';
ListInsert(&La,4,e);
printlist(La);
listdelet(&La,4,&e);
printf("\n\n%c\n\n",e);
printlist(La);
printf("List A length now is %d.\n\n",La.length);
getch();
init(&Lb);
e='A';
ListInsert(&Lb,1,e);
e='C';
ListInsert(&Lb,2,e);
e='F';
ListInsert(&Lb,3,e);
printlist(Lb);

干线 ()
{
ElemType e;
sqlist La 、磅,Lc;
clrscr;()
printf("\n\ n-------------------列表展示品正在运行...----------------\n\ n");
printf("首先是 InsertList 功能。\n");
init;(&La)
e='a';
ListInsert;(&La,1,e)
e='b';
ListInsert;(&La,2,e)
printlist(La);
printf("列表一个长度现在是 %d。\n\ n",La.length);
getch;()
e='f';
ListInsert;(&La,3,e)
e='9';
ListInsert;(&La,4,e)
printlist(La);
listdelet;(&La,4,&e)
printf("\n\ n% c\ n\ n",e);
printlist(La);
printf("列表一个长度现在是 %d。\n\ n",La.length);
getch;()
init;(&磅)
e='A';
ListInsert;(&磅,1,e)
e='C';
ListInsert;(&磅,2,e)
e='F';
ListInsert;(&磅,3,e)
printlist(磅);
printf("列表 B 长度现在是 %d。\n\ n",Lb.length);
getch;()