Compare commits

...

10 Commits

@ -43,18 +43,43 @@
## C1函数模块 ## C1函数模块
1.函数原形int main(); 1.函数原形int main();
2.功能调用ShowMainMenu()函数,显示主界面 2.功能调用ShowMainMenu()函数,显示主界面
``` ```
void ShowMainMenu()
{
system("cls");
printf("\n\n\n\n\n");
printf("\t|----------------------欢迎进入---------------------------\n");
printf("\t| 读者管理系统 \n");
printf("\t| 1、查询图书馆的总信息 \n");
printf("\t| 2、查询图书馆藏书信息 \n");
printf("\t| 3、存入新书 \n");
printf("\t| 4、旧书处理 \n");
printf("\t| 5、根据书名检索书刊信息 \n");
printf("\t| 6、查询读者的借阅信息 \n");
printf("\t| 7、查询读者信息 \n");
printf("\t| 8、读者借书 \n");
printf("\t| 9、读者还书 \n");
printf("\t| 10、文件保存 \n");
printf("\t| 11、从文件读取 \n");
printf("\t| 0、退出 \n");
printf("\t|---------------------------------------------------------\n");
printf("新打开程序需先添加管理员\n");
printf("\n");
printf("\t\t请选择0-11");
}
``` ```
## C2查询图书馆信息模块 ## C2查询图书馆信息模块
函数原形void ShowLibInfo(const Book* book, const Reader* reader); 函数原形void ShowLibInfo(const Book* book, const Reader* reader);
功能:接受两个形参,分别是图书的链表地址,读者的链表地址,并遍历两个链表,显示出图书的数量和读者的数量 功能:接受两个形参,分别是图书的链表地址,读者的链表地址,并遍历两个链表,显示出图书的数量和读者的数量
``` ```
void ShowLibInfo(const Book* book1, const Reader* reader1) void ShowLibInfo(const Book* book1, const Reader* reader1)
{ {
Book* book = book1; Book* book = book1;
@ -76,7 +101,6 @@ void ShowLibInfo(const Book* book1, const Reader* reader1)
return; return;
} }
``` ```
## C3查找图书馆藏书信息模块 ## C3查找图书馆藏书信息模块
@ -84,9 +108,18 @@ void ShowLibInfo(const Book* book1, const Reader* reader1)
1) 函数原形: void ShowLibBook(Book* book); 1) 函数原形: void ShowLibBook(Book* book);
2) 功能: 接受一个形参:图书的链表地址,遍历该链表,显示出所有图书的信息 2) 功能: 接受一个形参:图书的链表地址,遍历该链表,显示出所有图书的信息
``` ```
void ShowLibBook(Book* book1)
{
Book* book = book1;
while (book != NULL)
{ // \t :制表符
printf("%d\t%s\t%s\t%s\t%d\n", book->iNum, book->acName, book->acAuthor, book->acPress, book->iAmount);
book = book->next;
}
printf("\n按任意键返回\n");
getchar();
return;
}
``` ```
@ -95,10 +128,70 @@ void ShowLibInfo(const Book* book1, const Reader* reader1)
1) 函数原形: Book* AddBook(Book* book); 1) 函数原形: Book* AddBook(Book* book);
2) 功能: 接受一个形参:图书的链表地址,利用尾插对链表进行修改,添加图书 2) 功能: 接受一个形参:图书的链表地址,利用尾插对链表进行修改,添加图书
``` ```
Book* AddBook(Book* book1)
{
Book* book = book1;
if (book == NULL)
{
Book* tmp = (Book*)malloc(sizeof(Book));
tmp->next = NULL;
assert(tmp);
printf("输入书的编号:");
scanf("%d", &tmp->iNum);
getchar();
printf("输入书的名称:");
gets(&tmp->acName);
printf("输入书的作者:");
gets(tmp->acAuthor);
printf("输入书的出版社:");
gets(tmp->acPress);
printf("输入书的库存量:");
scanf("%d", &tmp->iAmount);
book = tmp;
printf("按任意键返回\n");
getchar();
return book;
return;
}
while (1)
{
while (book->next == NULL)
{
int flag = 1;
while (flag)
{
Book* tmp = (Book*)malloc(sizeof(Book));
tmp->next = NULL;
assert(tmp);
printf("输入书的编号:");
scanf("%d", &tmp->iNum);
getchar();
printf("输入书的名称:");
gets(&tmp->acName);
printf("输入书的作者:");
gets(tmp->acAuthor);
printf("输入书的出版社:");
gets(tmp->acPress);
printf("输入书的库存量:");
scanf("%d", &tmp->iAmount);
book->next = tmp;
printf("是否继续输入:1==>继续\t0==>结束\t");
scanf("%d", &flag);
getchar();
if (flag == 0)
{
printf("按任意键返回\n");
getchar();
return book1;
}
}
}
book = book->next;
}
printf("按任意键返回\n");
getchar();
return;
}
``` ```
@ -108,7 +201,39 @@ void ShowLibInfo(const Book* book1, const Reader* reader1)
2) 功能: 接受一个形参:图书链表的地址,遍历该链表,用书的编号进行匹配,找到该图书后删除该图书,否则返回 2) 功能: 接受一个形参:图书链表的地址,遍历该链表,用书的编号进行匹配,找到该图书后删除该图书,否则返回
``` ```
Book* DealoldBook(Book* book1)
{
Book* book = book1;
Book* prev = book1;
printf("输入要处理旧书的编号:");
int id;
scanf("%d", &id);
getchar();
while (book != NULL)
{
if (id == book->iNum)
{
if (book1 == book)
{
book = book->next;
free(prev);
return book;
}
prev->next = book->next;
free(book); // free():释放资源
printf("已将旧书处理掉!\n");
printf("按任意键返回\n");
getchar();
return book1;
}
prev = book;
book = book->next;
}
printf("没有找到该图书\n");
printf("按任意键返回\n");
getchar();
return book1;
}
``` ```
@ -117,6 +242,7 @@ void ShowLibInfo(const Book* book1, const Reader* reader1)
1函数原形: void foundBook(Book* book); 1函数原形: void foundBook(Book* book);
2) 功能:接受一个形参:图书链表的地址,遍历该链表,用书的编号进行匹配,找到该图书后显示该图书,否则返回 2) 功能:接受一个形参:图书链表的地址,遍历该链表,用书的编号进行匹配,找到该图书后显示该图书,否则返回
``` ```
void foundBook(Book* book1) void foundBook(Book* book1)
{ {
Book* book = book1; Book* book = book1;
@ -142,9 +268,6 @@ void foundBook(Book* book1)
return; return;
} }
``` ```
## C7:查询读者借阅信息模块 ## C7:查询读者借阅信息模块
@ -152,6 +275,7 @@ void foundBook(Book* book1)
1函数原形: void foundReader_Info(Reader* reader); 1函数原形: void foundReader_Info(Reader* reader);
2) 功能: 接受一个形参:读者链表的地址,遍历该链表,用读者的编号进行匹配,找到该读者显示该读者的信息,否则返回 2) 功能: 接受一个形参:读者链表的地址,遍历该链表,用读者的编号进行匹配,找到该读者显示该读者的信息,否则返回
``` ```
void foundReader_Info(Reader* reader1) void foundReader_Info(Reader* reader1)
{ {
Reader* reader = reader1; //备份 Reader* reader = reader1; //备份
@ -183,8 +307,6 @@ void foundReader_Info(Reader* reader1)
return; return;
} }
``` ```
## C8:查询读者借书模块 ## C8:查询读者借书模块
@ -192,6 +314,7 @@ void foundReader_Info(Reader* reader1)
1函数原形: void foundReaderInfo(Reader* reader); 1函数原形: void foundReaderInfo(Reader* reader);
2功能: 接受一个形参:读者链表的地址,遍历该链表,用读者的编号进行匹配,找到该读者显示该读者的借阅信息,否则返回 2功能: 接受一个形参:读者链表的地址,遍历该链表,用读者的编号进行匹配,找到该读者显示该读者的借阅信息,否则返回
``` ```
void foundReaderInfo(Reader* reader1) void foundReaderInfo(Reader* reader1)
{ {
Reader* reader = reader1; Reader* reader = reader1;
@ -227,6 +350,7 @@ void foundReaderInfo(Reader* reader1)
1)函数原形: Reader* LendBook(Reader* reader, Book* book); 1)函数原形: Reader* LendBook(Reader* reader, Book* book);
2)功能:接受两个形参:读者链表地址和图书链表地址,用读者的编号进行匹配,找到该读者后,用图书的编号进行匹配,进行借书,否则返回 2)功能:接受两个形参:读者链表地址和图书链表地址,用读者的编号进行匹配,找到该读者后,用图书的编号进行匹配,进行借书,否则返回
``` ```
Reader* LendBook(Reader* reader1, Book* book1) Reader* LendBook(Reader* reader1, Book* book1)
{ {
Reader* reader = reader1; Reader* reader = reader1;
@ -497,22 +621,21 @@ Book* read1()
文件保存 文件保存
从文件读取 从文件读取
上述各模块通过主程序main进行调用系统模块图如下: 上述各模块通过主程序main进行调用系统模块图如下:
![](images/text.drawio.svg)
## 详细设计 ## 详细设计
针对概要设计 针对概要设计
C2:void ShowLibInfo(const Book* book, const Reader* reader);\\查询图书馆的总信息 C2:void ShowLibInfo(const Book* book, const Reader* reader);\\查询图书馆的总信息
![C2](c2.svg) ![C2](images/c2.svg)
C3:void ShowLibBook(Book* book);\\查询图书馆藏书信息 C3:void ShowLibBook(Book* book);\\查询图书馆藏书信息
![c3](images/c3.svg)
C4:Book* AddBook(Book* book);\\存入新书 C4:Book* AddBook(Book* book);\\存入新书
![c4](images/c4.svg)
C5:Book* DealoldBook(Book* book);\\旧书处理 C5:Book* DealoldBook(Book* book);\\旧书处理
![c5](images/c5.svg)
C6:void foundBook(Book* book);\\根据书名检索书刊信息 C6:void foundBook(Book* book);\\根据书名检索书刊信息
![C6](images/foundbook.svg) ![C6](images/foundbook.svg)
C7:void foundReader_Info(Reader* reader);\\查询读者的借阅信息 C7:void foundReader_Info(Reader* reader);\\查询读者的借阅信息
![C7](images/foundreaderinfo.svg) ![C7](images/foundreaderinfo.svg)
C8:void foundReaderInfo(Reader* reader);\\查询读者信息 C8:void foundReaderInfo(Reader* reader);\\查询读者信息

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 8.4 KiB

@ -0,0 +1,75 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created by Flowgorithm 3.4.2 (http://flowgorithm.org) -->
<svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" version="1.1" width="2412" height="2484">
<rect x="0" y="0" width="2412" height="2484" fill="#FFFFFF"/>
<g>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="612,288 612,375"/>
<polygon fill="#404040" stroke="none" points="612,396 632,361 591,361"/>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="612,2088 612,2175"/>
<polygon fill="#404040" stroke="none" points="612,2196 632,2161 591,2161"/>
<g>
<path fill="#F0E0FF" stroke="#9070A0" stroke-width="5" stroke-dasharray="none" d="M 468,144 A 72 72, 0, 0 0, 468 288 L 756,288 A 72 72, 0, 0 0, 756 144 Z"/>
<text x="612" y="165" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="612" dy="72" unicode-bidi="embed">Main</tspan>
</text>
</g>
<g>
<path fill="#F0E0FF" stroke="#9070A0" stroke-width="5" stroke-dasharray="none" d="M 468,2196 A 72 72, 0, 0 0, 468 2340 L 756,2340 A 72 72, 0, 0 0, 756 2196 Z"/>
<text x="612" y="2217" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="612" dy="72" unicode-bidi="embed">End</tspan>
</text>
</g>
<g>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="612,540 612,663"/>
<polygon fill="#404040" stroke="none" points="612,684 632,649 591,649"/>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="612,828 612,1707"/>
<polygon fill="#404040" stroke="none" points="612,1728 632,1693 591,1693"/>
<g>
<path fill="#C04040" stroke="#602020" stroke-width="5" stroke-dasharray="none" d="M 288,396 L 288,540 L 936,540 L 936,396 Z"/>
<text x="612" y="417" fill="#FFFFFF" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="612" dy="72" unicode-bidi="embed">Book*book = book1</tspan>
</text>
</g>
<g>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="936,756 1548,756 1548,879"/>
<polygon fill="#404040" stroke="none" points="1548,900 1568,865 1527,865"/>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="1548,1476 1548,1584 684,1584 684,848"/>
<polygon fill="#404040" stroke="none" points="684,828 663,862 704,862"/>
<g>
<path fill="#C04040" stroke="#602020" stroke-width="5" stroke-dasharray="none" d="M 1116,900 L 828,1476 L 1980,1476 L 2268,900 Z"/>
<text x="1548" y="921" fill="#FFFFFF" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1548" dy="72" unicode-bidi="embed">Output printf(&quot;%d\t%s\t%s\t</tspan>
<tspan x="1548" dy="72" unicode-bidi="embed">%s\t%d\n&quot;, book-&gt;iNum,</tspan>
<tspan x="1548" dy="72" unicode-bidi="embed"> book-&gt;acName, book-&gt;</tspan>
<tspan x="1548" dy="72" unicode-bidi="embed">acAuthor, book-&gt;acPress,</tspan>
<tspan x="1548" dy="72" unicode-bidi="embed"> book-&gt;</tspan>
<tspan x="1548" dy="72" unicode-bidi="embed">iAmount);&#13;</tspan>
<tspan x="1548" dy="72" unicode-bidi="embed">book = book-&gt;next;</tspan>
</text>
</g>
<g>
<path fill="#FFE0A0" stroke="#A08040" stroke-width="5" stroke-dasharray="none" d="M 360,684 L 288,756 L 360,828 L 864,828 L 936,756 L 864,684 Z"/>
<text x="612" y="705" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="612" dy="72" unicode-bidi="embed">book!=NULL</tspan>
</text>
</g>
<text x="1044" y="633" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1044" dy="72" unicode-bidi="embed">True</tspan>
</text>
<text x="486" y="849" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="486" dy="72" unicode-bidi="embed">False</tspan>
</text>
</g>
<g>
<path fill="#C04040" stroke="#602020" stroke-width="5" stroke-dasharray="none" d="M 324,1728 L 144,2088 L 900,2088 L 1080,1728 Z"/>
<text x="612" y="1749" fill="#FFFFFF" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="612" dy="72" unicode-bidi="embed">Output printf(&quot;\</tspan>
<tspan x="612" dy="72" unicode-bidi="embed">n&#25353;&#20219;&#24847;&#38190;&#36820;&#22238;\</tspan>
<tspan x="612" dy="72" unicode-bidi="embed">n&quot;);&#13;</tspan>
<tspan x="612" dy="72" unicode-bidi="embed">getchar();</tspan>
</text>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.7 KiB

@ -0,0 +1,281 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created by Flowgorithm 3.4.2 (http://flowgorithm.org) -->
<svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" version="1.1" width="6480" height="11124">
<rect x="0" y="0" width="6480" height="11124" fill="#FFFFFF"/>
<g>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="756,288 756,375"/>
<polygon fill="#404040" stroke="none" points="756,396 776,361 735,361"/>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="756,10728 756,10815"/>
<polygon fill="#404040" stroke="none" points="756,10836 776,10801 735,10801"/>
<g>
<path fill="#F0E0FF" stroke="#9070A0" stroke-width="5" stroke-dasharray="none" d="M 612,144 A 72 72, 0, 0 0, 612 288 L 900,288 A 72 72, 0, 0 0, 900 144 Z"/>
<text x="756" y="165" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="756" dy="72" unicode-bidi="embed">kaishi</tspan>
</text>
</g>
<g>
<path fill="#F0E0FF" stroke="#9070A0" stroke-width="5" stroke-dasharray="none" d="M 612,10836 A 72 72, 0, 0 0, 612 10980 L 900,10980 A 72 72, 0, 0 0, 900 10836 Z"/>
<text x="756" y="10857" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="756" dy="72" unicode-bidi="embed">End</tspan>
</text>
</g>
<g>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="756,540 756,627"/>
<polygon fill="#404040" stroke="none" points="756,648 776,613 735,613"/>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="756,4068 756,4191"/>
<polygon fill="#404040" stroke="none" points="756,4212 776,4177 735,4177"/>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="756,4356 756,10419"/>
<polygon fill="#404040" stroke="none" points="756,10440 776,10405 735,10405"/>
<g>
<path fill="#C04040" stroke="#602020" stroke-width="5" stroke-dasharray="none" d="M 432,396 L 432,540 L 1080,540 L 1080,396 Z"/>
<text x="756" y="417" fill="#FFFFFF" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="756" dy="72" unicode-bidi="embed">Book*book = book1</tspan>
</text>
</g>
<g>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="1044,828 2700,828 2700,1059"/>
<polygon fill="#404040" stroke="none" points="2700,1080 2720,1045 2679,1045"/>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="2700,3888 2700,4032 812,4032"/>
<polygon fill="#404040" stroke="none" points="792,4032 826,4052 826,4011"/>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="468,828 180,828 180,4032 699,4032"/>
<polygon fill="#404040" stroke="none" points="720,4032 685,4011 685,4052"/>
<g>
<path fill="#FFD0D0" stroke="#A07070" stroke-width="5" stroke-dasharray="none" d="M 756,648 L 432,828 L 756,1008 L 1080,828 Z"/>
<text x="756" y="777" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="756" dy="72" unicode-bidi="embed">book==NULL</tspan>
</text>
</g>
<g>
<path fill="#C04040" stroke="#602020" stroke-width="5" stroke-dasharray="none" d="M 2232,1080 L 828,3888 L 3168,3888 L 4572,1080 Z"/>
<text x="2700" y="1101" fill="#FFFFFF" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="2700" dy="72" unicode-bidi="embed">Output Book* tmp = (Book*)</tspan>
<tspan x="2700" dy="72" unicode-bidi="embed">malloc(sizeof</tspan>
<tspan x="2700" dy="72" unicode-bidi="embed">(Book));&#13;</tspan>
<tspan x="2700" dy="72" unicode-bidi="embed">&#9;&#9;tmp-&gt;next = NULL</tspan>
<tspan x="2700" dy="72" unicode-bidi="embed">;&#13;</tspan>
<tspan x="2700" dy="72" unicode-bidi="embed">&#9;&#9;assert</tspan>
<tspan x="2700" dy="72" unicode-bidi="embed">(tmp);&#13;</tspan>
<tspan x="2700" dy="72" unicode-bidi="embed">&#9;&#9;printf</tspan>
<tspan x="2700" dy="72" unicode-bidi="embed">(&quot;&#36755;&#20837;&#20070;&#30340;&#32534;&#21495;:&quot;);&#13;</tspan>
<tspan x="2700" dy="72" unicode-bidi="embed">&#9;&#9;scanf(&quot;%d&quot;, &amp;tmp-&gt;</tspan>
<tspan x="2700" dy="72" unicode-bidi="embed">iNum);&#13;</tspan>
<tspan x="2700" dy="72" unicode-bidi="embed">&#9;&#9;getchar</tspan>
<tspan x="2700" dy="72" unicode-bidi="embed">();&#13;</tspan>
<tspan x="2700" dy="72" unicode-bidi="embed">&#9;&#9;printf</tspan>
<tspan x="2700" dy="72" unicode-bidi="embed">(&quot;&#36755;&#20837;&#20070;&#30340;&#21517;&#31216;:&quot;);&#13;</tspan>
<tspan x="2700" dy="72" unicode-bidi="embed">&#9;&#9;gets(&amp;tmp-&gt;</tspan>
<tspan x="2700" dy="72" unicode-bidi="embed">acName);&#13;</tspan>
<tspan x="2700" dy="72" unicode-bidi="embed">&#9;&#9;printf</tspan>
<tspan x="2700" dy="72" unicode-bidi="embed">(&quot;&#36755;&#20837;&#20070;&#30340;&#20316;&#32773;:&quot;);&#13;</tspan>
<tspan x="2700" dy="72" unicode-bidi="embed">&#9;&#9;gets(tmp-&gt;</tspan>
<tspan x="2700" dy="72" unicode-bidi="embed">acAuthor);&#13;</tspan>
<tspan x="2700" dy="72" unicode-bidi="embed">&#9;&#9;printf</tspan>
<tspan x="2700" dy="72" unicode-bidi="embed">(&quot;&#36755;&#20837;&#20070;&#30340;&#20986;&#29256;&#31038;:&quot;);&#13;</tspan>
<tspan x="2700" dy="72" unicode-bidi="embed">&#9;&#9;gets(tmp-&gt;</tspan>
<tspan x="2700" dy="72" unicode-bidi="embed">acPress);&#13;</tspan>
<tspan x="2700" dy="72" unicode-bidi="embed">&#9;&#9;printf</tspan>
<tspan x="2700" dy="72" unicode-bidi="embed">(&quot;&#36755;&#20837;&#20070;&#30340;&#24211;&#23384;&#37327;:&quot;);&#13;</tspan>
<tspan x="2700" dy="72" unicode-bidi="embed">&#9;&#9;scanf(&quot;%d&quot;, &amp;tmp-&gt;</tspan>
<tspan x="2700" dy="72" unicode-bidi="embed">iAmount);&#13;</tspan>
<tspan x="2700" dy="72" unicode-bidi="embed">&#9;&#9;book = tmp</tspan>
<tspan x="2700" dy="72" unicode-bidi="embed">;&#13;</tspan>
<tspan x="2700" dy="72" unicode-bidi="embed"></tspan>
<tspan x="2700" dy="72" unicode-bidi="embed"> &#13;</tspan>
<tspan x="2700" dy="72" unicode-bidi="embed">&#9;&#9;printf(&quot;&#25353;&#20219;&#24847;&#38190;&#36820;&#22238;\</tspan>
<tspan x="2700" dy="72" unicode-bidi="embed">n&quot;);&#13;</tspan>
<tspan x="2700" dy="72" unicode-bidi="embed">&#9;&#9;getchar</tspan>
<tspan x="2700" dy="72" unicode-bidi="embed">();&#13;</tspan>
<tspan x="2700" dy="72" unicode-bidi="embed">&#9;&#9;return book;</tspan>
</text>
</g>
<g>
</g>
<ellipse cx="756" cy="4032" rx="36" ry="36" fill="#FFD0D0" stroke="#A07070" stroke-width="5"/>
<text x="1188" y="705" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1188" dy="72" unicode-bidi="embed">True</tspan>
</text>
<text x="306" y="705" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="306" dy="72" unicode-bidi="embed">False</tspan>
</text>
</g>
<g>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="972,4284 1440,4284 1440,4443"/>
<polygon fill="#404040" stroke="none" points="1440,4464 1460,4429 1419,4429"/>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="1440,10188 1440,10296 828,10296 828,4376"/>
<polygon fill="#404040" stroke="none" points="828,4356 807,4390 848,4390"/>
<g>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="1440,4608 1440,10023"/>
<polygon fill="#404040" stroke="none" points="1440,10044 1460,10009 1419,10009"/>
<g>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="1836,4536 2016,4536 2016,4659"/>
<polygon fill="#404040" stroke="none" points="2016,4680 2036,4645 1995,4645"/>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="2016,5400 2016,9900 1512,9900 1512,4628"/>
<polygon fill="#404040" stroke="none" points="1512,4608 1491,4642 1532,4642"/>
<g>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="2016,4860 2016,4947"/>
<polygon fill="#404040" stroke="none" points="2016,4968 2036,4933 1995,4933"/>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="2016,5112 2016,5235"/>
<polygon fill="#404040" stroke="none" points="2016,5256 2036,5221 1995,5221"/>
<g>
<path fill="#FFFFD0" stroke="#A0A070" stroke-width="5" stroke-dasharray="none" d="M 1800,4680 L 1800,4860 L 2232,4860 L 2232,4680 Z"/>
<polyline fill="none" stroke="#A0A070" stroke-width="5" stroke-dasharray="none" points="1800,4716 2232,4716"/>
<polyline fill="none" stroke="#A0A070" stroke-width="5" stroke-dasharray="none" points="1836,4680 1836,4860"/>
<text x="2034" y="4737" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="2034" dy="72" unicode-bidi="embed">Integer flag</tspan>
</text>
</g>
<g>
<path fill="#FFFFD0" stroke="#A0A070" stroke-width="5" stroke-dasharray="none" d="M 1800,4968 L 1800,5112 L 2232,5112 L 2232,4968 Z"/>
<text x="2016" y="4989" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="2016" dy="72" unicode-bidi="embed">flag = 1</tspan>
</text>
</g>
<g>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="2232,5328 4284,5328 4284,5451"/>
<polygon fill="#404040" stroke="none" points="4284,5472 4304,5437 4263,5437"/>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="4284,9648 4284,9756 2088,9756 2088,5420"/>
<polygon fill="#404040" stroke="none" points="2088,5400 2067,5434 2108,5434"/>
<g>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="4284,8640 4284,8727"/>
<polygon fill="#404040" stroke="none" points="4284,8748 4304,8713 4263,8713"/>
<g>
<path fill="#C04040" stroke="#602020" stroke-width="5" stroke-dasharray="none" d="M 3816,5472 L 2232,8640 L 4752,8640 L 6336,5472 Z"/>
<text x="4284" y="5493" fill="#FFFFFF" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="4284" dy="72" unicode-bidi="embed">Output Book* tmp = (Book*)</tspan>
<tspan x="4284" dy="72" unicode-bidi="embed">malloc(sizeof</tspan>
<tspan x="4284" dy="72" unicode-bidi="embed">(Book));&#13;</tspan>
<tspan x="4284" dy="72" unicode-bidi="embed"></tspan>
<tspan x="4284" dy="72" unicode-bidi="embed"> &#13;</tspan>
<tspan x="4284" dy="72" unicode-bidi="embed">&#9;&#9;&#9;&#9;tmp-&gt;next = NULL</tspan>
<tspan x="4284" dy="72" unicode-bidi="embed">;&#13;</tspan>
<tspan x="4284" dy="72" unicode-bidi="embed">&#9;&#9;&#9;&#9;assert</tspan>
<tspan x="4284" dy="72" unicode-bidi="embed">(tmp);&#13;</tspan>
<tspan x="4284" dy="72" unicode-bidi="embed">&#9;&#9;&#9;&#9;printf</tspan>
<tspan x="4284" dy="72" unicode-bidi="embed">(&quot;&#36755;&#20837;&#20070;&#30340;&#32534;&#21495;:&quot;);&#13;</tspan>
<tspan x="4284" dy="72" unicode-bidi="embed">&#9;&#9;&#9;&#9;scanf(&quot;%d&quot;, &amp;tmp-&gt;</tspan>
<tspan x="4284" dy="72" unicode-bidi="embed">iNum);&#13;</tspan>
<tspan x="4284" dy="72" unicode-bidi="embed">&#9;&#9;&#9;&#9;getchar</tspan>
<tspan x="4284" dy="72" unicode-bidi="embed">();&#13;</tspan>
<tspan x="4284" dy="72" unicode-bidi="embed">&#9;&#9;&#9;&#9;printf</tspan>
<tspan x="4284" dy="72" unicode-bidi="embed">(&quot;&#36755;&#20837;&#20070;&#30340;&#21517;&#31216;:&quot;);&#13;</tspan>
<tspan x="4284" dy="72" unicode-bidi="embed">&#9;&#9;&#9;&#9;gets(&amp;tmp-&gt;</tspan>
<tspan x="4284" dy="72" unicode-bidi="embed">acName);&#13;</tspan>
<tspan x="4284" dy="72" unicode-bidi="embed">&#9;&#9;&#9;&#9;printf</tspan>
<tspan x="4284" dy="72" unicode-bidi="embed">(&quot;&#36755;&#20837;&#20070;&#30340;&#20316;&#32773;:&quot;);&#13;</tspan>
<tspan x="4284" dy="72" unicode-bidi="embed">&#9;&#9;&#9;&#9;gets(tmp-&gt;</tspan>
<tspan x="4284" dy="72" unicode-bidi="embed">acAuthor);&#13;</tspan>
<tspan x="4284" dy="72" unicode-bidi="embed">&#9;&#9;&#9;&#9;printf</tspan>
<tspan x="4284" dy="72" unicode-bidi="embed">(&quot;&#36755;&#20837;&#20070;&#30340;&#20986;&#29256;&#31038;:&quot;);&#13;</tspan>
<tspan x="4284" dy="72" unicode-bidi="embed">&#9;&#9;&#9;&#9;gets(tmp-&gt;</tspan>
<tspan x="4284" dy="72" unicode-bidi="embed">acPress);&#13;</tspan>
<tspan x="4284" dy="72" unicode-bidi="embed">&#9;&#9;&#9;&#9;printf</tspan>
<tspan x="4284" dy="72" unicode-bidi="embed">(&quot;&#36755;&#20837;&#20070;&#30340;&#24211;&#23384;&#37327;:&quot;);&#13;</tspan>
<tspan x="4284" dy="72" unicode-bidi="embed">&#9;&#9;&#9;&#9;scanf(&quot;%d&quot;, &amp;tmp-&gt;</tspan>
<tspan x="4284" dy="72" unicode-bidi="embed">iAmount);&#13;</tspan>
<tspan x="4284" dy="72" unicode-bidi="embed"></tspan>
<tspan x="4284" dy="72" unicode-bidi="embed"> &#13;</tspan>
<tspan x="4284" dy="72" unicode-bidi="embed">&#9;&#9;&#9;&#9;book-&gt;next = tmp</tspan>
<tspan x="4284" dy="72" unicode-bidi="embed">;&#13;</tspan>
<tspan x="4284" dy="72" unicode-bidi="embed"></tspan>
<tspan x="4284" dy="72" unicode-bidi="embed"> &#13;</tspan>
<tspan x="4284" dy="72" unicode-bidi="embed">&#9;&#9;&#9;&#9;printf(&quot;&#26159;&#21542;&#32487;&#32493;&#36755;&#20837;:1==&gt;</tspan>
<tspan x="4284" dy="72" unicode-bidi="embed">&#32487;&#32493;\t0==&gt;&#32467;&#26463;\</tspan>
<tspan x="4284" dy="72" unicode-bidi="embed">t&quot;);&#13;</tspan>
<tspan x="4284" dy="72" unicode-bidi="embed">&#9;&#9;&#9;&#9;scanf(&quot;%d&quot;, &amp;</tspan>
<tspan x="4284" dy="72" unicode-bidi="embed">flag);&#13;</tspan>
<tspan x="4284" dy="72" unicode-bidi="embed">&#9;&#9;&#9;&#9;getchar();</tspan>
</text>
</g>
<g>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="4464,8856 5040,8856 5040,9015"/>
<polygon fill="#404040" stroke="none" points="5040,9036 5060,9001 5019,9001"/>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="5040,9468 5040,9612 4340,9612"/>
<polygon fill="#404040" stroke="none" points="4320,9612 4354,9632 4354,9591"/>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="4104,8856 3816,8856 3816,9612 4227,9612"/>
<polygon fill="#404040" stroke="none" points="4248,9612 4213,9591 4213,9632"/>
<g>
<path fill="#FFD0D0" stroke="#A07070" stroke-width="5" stroke-dasharray="none" d="M 4284,8748 L 4068,8856 L 4284,8964 L 4500,8856 Z"/>
<text x="4284" y="8805" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="4284" dy="72" unicode-bidi="embed">flag==0</tspan>
</text>
</g>
<g>
<path fill="#C04040" stroke="#602020" stroke-width="5" stroke-dasharray="none" d="M 4572,9036 L 4356,9468 L 5508,9468 L 5724,9036 Z"/>
<text x="5040" y="9057" fill="#FFFFFF" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="5040" dy="72" unicode-bidi="embed">Output printf(&quot;&#25353;&#20219;&#24847;&#38190;&#36820;&#22238;\</tspan>
<tspan x="5040" dy="72" unicode-bidi="embed">n&quot;);&#13;</tspan>
<tspan x="5040" dy="72" unicode-bidi="embed">&#9;&#9;&#9;&#9;&#9;getchar</tspan>
<tspan x="5040" dy="72" unicode-bidi="embed">();&#13;</tspan>
<tspan x="5040" dy="72" unicode-bidi="embed">&#9;&#9;&#9;&#9;&#9;return book1;</tspan>
</text>
</g>
<g>
</g>
<ellipse cx="4284" cy="9612" rx="36" ry="36" fill="#FFD0D0" stroke="#A07070" stroke-width="5"/>
<text x="4608" y="8733" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="4608" dy="72" unicode-bidi="embed">True</tspan>
</text>
<text x="3942" y="8733" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="3942" dy="72" unicode-bidi="embed">False</tspan>
</text>
</g>
</g>
<g>
<path fill="#FFE0A0" stroke="#A08040" stroke-width="5" stroke-dasharray="none" d="M 1872,5256 L 1800,5328 L 1872,5400 L 2160,5400 L 2232,5328 L 2160,5256 Z"/>
<text x="2016" y="5277" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="2016" dy="72" unicode-bidi="embed">flag</tspan>
</text>
</g>
<text x="2340" y="5205" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="2340" dy="72" unicode-bidi="embed">True</tspan>
</text>
<text x="1890" y="5421" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1890" dy="72" unicode-bidi="embed">False</tspan>
</text>
</g>
</g>
<g>
<path fill="#C04040" stroke="#602020" stroke-width="5" stroke-dasharray="none" d="M 1116,4464 L 1044,4536 L 1116,4608 L 1764,4608 L 1836,4536 L 1764,4464 Z"/>
<text x="1440" y="4485" fill="#FFFFFF" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1440" dy="72" unicode-bidi="embed">book-&gt;next==NULL</tspan>
</text>
</g>
<text x="1944" y="4413" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1944" dy="72" unicode-bidi="embed">True</tspan>
</text>
<text x="1314" y="4629" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1314" dy="72" unicode-bidi="embed">False</tspan>
</text>
</g>
<g>
<path fill="#C04040" stroke="#602020" stroke-width="5" stroke-dasharray="none" d="M 1044,10044 L 972,10188 L 1836,10188 L 1908,10044 Z"/>
<text x="1440" y="10065" fill="#FFFFFF" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1440" dy="72" unicode-bidi="embed">Output book=book-&gt;next</tspan>
</text>
</g>
</g>
<g>
<path fill="#FFE0A0" stroke="#A08040" stroke-width="5" stroke-dasharray="none" d="M 612,4212 L 540,4284 L 612,4356 L 900,4356 L 972,4284 L 900,4212 Z"/>
<text x="756" y="4233" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="756" dy="72" unicode-bidi="embed">1</tspan>
</text>
</g>
<text x="1080" y="4161" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1080" dy="72" unicode-bidi="embed">True</tspan>
</text>
<text x="630" y="4377" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="630" dy="72" unicode-bidi="embed">False</tspan>
</text>
</g>
<g>
<path fill="#C04040" stroke="#602020" stroke-width="5" stroke-dasharray="none" d="M 288,10440 L 144,10728 L 1224,10728 L 1368,10440 Z"/>
<text x="756" y="10461" fill="#FFFFFF" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="756" dy="72" unicode-bidi="embed">Output printf(&quot;&#25353;&#20219;&#24847;&#38190;&#36820;&#22238;\</tspan>
<tspan x="756" dy="72" unicode-bidi="embed">n&quot;);&#13;</tspan>
<tspan x="756" dy="72" unicode-bidi="embed">&#9;getchar();</tspan>
</text>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 20 KiB

@ -0,0 +1,183 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created by Flowgorithm 3.4.2 (http://flowgorithm.org) -->
<svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" version="1.1" width="5724" height="5472">
<rect x="0" y="0" width="5724" height="5472" fill="#FFFFFF"/>
<g>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="756,288 756,375"/>
<polygon fill="#404040" stroke="none" points="756,396 776,361 735,361"/>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="756,5076 756,5163"/>
<polygon fill="#404040" stroke="none" points="756,5184 776,5149 735,5149"/>
<g>
<path fill="#F0E0FF" stroke="#9070A0" stroke-width="5" stroke-dasharray="none" d="M 612,144 A 72 72, 0, 0 0, 612 288 L 900,288 A 72 72, 0, 0 0, 900 144 Z"/>
<text x="756" y="165" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="756" dy="72" unicode-bidi="embed">begin</tspan>
</text>
</g>
<g>
<path fill="#F0E0FF" stroke="#9070A0" stroke-width="5" stroke-dasharray="none" d="M 432,5184 A 72 72, 0, 0 0, 432 5328 L 1080,5328 A 72 72, 0, 0 0, 1080 5184 Z"/>
<text x="756" y="5205" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="756" dy="72" unicode-bidi="embed">Return Integer book1</tspan>
</text>
</g>
<g>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="756,540 756,627"/>
<polygon fill="#404040" stroke="none" points="756,648 776,613 735,613"/>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="756,792 756,879"/>
<polygon fill="#404040" stroke="none" points="756,900 776,865 735,865"/>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="756,1116 756,1203"/>
<polygon fill="#404040" stroke="none" points="756,1224 776,1189 735,1189"/>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="756,1404 756,1491"/>
<polygon fill="#404040" stroke="none" points="756,1512 776,1477 735,1477"/>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="756,1656 756,1779"/>
<polygon fill="#404040" stroke="none" points="756,1800 776,1765 735,1765"/>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="756,1944 756,4551"/>
<polygon fill="#404040" stroke="none" points="756,4572 776,4537 735,4537"/>
<g>
<path fill="#C04040" stroke="#602020" stroke-width="5" stroke-dasharray="none" d="M 432,396 L 432,540 L 1080,540 L 1080,396 Z"/>
<text x="756" y="417" fill="#FFFFFF" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="756" dy="72" unicode-bidi="embed">Book*book = book1</tspan>
</text>
</g>
<g>
<path fill="#C04040" stroke="#602020" stroke-width="5" stroke-dasharray="none" d="M 432,648 L 432,792 L 1080,792 L 1080,648 Z"/>
<text x="756" y="669" fill="#FFFFFF" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="756" dy="72" unicode-bidi="embed">Book*pre = book1</tspan>
</text>
</g>
<g>
<path fill="#C04040" stroke="#602020" stroke-width="5" stroke-dasharray="none" d="M 324,900 L 216,1116 L 1188,1116 L 1296,900 Z"/>
<text x="756" y="921" fill="#FFFFFF" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="756" dy="72" unicode-bidi="embed">Output printf</tspan>
<tspan x="756" dy="72" unicode-bidi="embed">(&quot;&#36755;&#20837;&#35201;&#22788;&#29702;&#26087;&#20070;&#30340;&#32534;&#21495;:&quot;);</tspan>
</text>
</g>
<g>
<path fill="#FFFFD0" stroke="#A0A070" stroke-width="5" stroke-dasharray="none" d="M 540,1224 L 540,1404 L 972,1404 L 972,1224 Z"/>
<polyline fill="none" stroke="#A0A070" stroke-width="5" stroke-dasharray="none" points="540,1260 972,1260"/>
<polyline fill="none" stroke="#A0A070" stroke-width="5" stroke-dasharray="none" points="576,1224 576,1404"/>
<text x="774" y="1281" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="774" dy="72" unicode-bidi="embed">Integer id</tspan>
</text>
</g>
<g>
<path fill="#C0E0FF" stroke="#6080A0" stroke-width="5" stroke-dasharray="none" d="M 612,1512 L 540,1656 L 900,1656 L 972,1512 Z"/>
<text x="756" y="1533" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="756" dy="72" unicode-bidi="embed">Input id</tspan>
</text>
</g>
<g>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="1080,1872 2088,1872 2088,1995"/>
<polygon fill="#404040" stroke="none" points="2088,2016 2108,1981 2067,1981"/>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="2088,4320 2088,4428 828,4428 828,1964"/>
<polygon fill="#404040" stroke="none" points="828,1944 807,1978 848,1978"/>
<g>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="2412,2196 4212,2196 4212,2427"/>
<polygon fill="#404040" stroke="none" points="4212,2448 4232,2413 4191,2413"/>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="4212,4140 4212,4284 2144,4284"/>
<polygon fill="#404040" stroke="none" points="2124,4284 2158,4304 2158,4263"/>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="1764,2196 1476,2196 1476,2427"/>
<polygon fill="#404040" stroke="none" points="1476,2448 1496,2413 1455,2413"/>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="1476,2736 1476,4284 2031,4284"/>
<polygon fill="#404040" stroke="none" points="2052,4284 2017,4263 2017,4304"/>
<g>
<path fill="#C04040" stroke="#602020" stroke-width="5" stroke-dasharray="none" d="M 2088,2016 L 1728,2196 L 2088,2376 L 2448,2196 Z"/>
<text x="2088" y="2145" fill="#FFFFFF" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="2088" dy="72" unicode-bidi="embed">id==book-&gt;iNUm</tspan>
</text>
</g>
<g>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="4500,2628 4932,2628 4932,2859"/>
<polygon fill="#404040" stroke="none" points="4932,2880 4952,2845 4911,2845"/>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="4932,3312 4932,4104 4268,4104"/>
<polygon fill="#404040" stroke="none" points="4248,4104 4282,4124 4282,4083"/>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="3924,2628 3168,2628 3168,2859"/>
<polygon fill="#404040" stroke="none" points="3168,2880 3188,2845 3147,2845"/>
<polyline fill="none" stroke="#404040" stroke-width="9" stroke-dasharray="none" points="3168,3960 3168,4104 4155,4104"/>
<polygon fill="#404040" stroke="none" points="4176,4104 4141,4083 4141,4124"/>
<g>
<path fill="#FFD0D0" stroke="#A07070" stroke-width="5" stroke-dasharray="none" d="M 4212,2448 L 3888,2628 L 4212,2808 L 4536,2628 Z"/>
<text x="4212" y="2577" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="4212" dy="72" unicode-bidi="embed">book1==book</tspan>
</text>
</g>
<g>
<path fill="#C04040" stroke="#602020" stroke-width="5" stroke-dasharray="none" d="M 4500,2880 L 4284,3312 L 5364,3312 L 5580,2880 Z"/>
<text x="4932" y="2901" fill="#FFFFFF" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="4932" dy="72" unicode-bidi="embed">Output book = book-&gt;next</tspan>
<tspan x="4932" dy="72" unicode-bidi="embed">;&#13;</tspan>
<tspan x="4932" dy="72" unicode-bidi="embed">&#9;&#9;&#9;&#9;free</tspan>
<tspan x="4932" dy="72" unicode-bidi="embed">(prev);&#13;</tspan>
<tspan x="4932" dy="72" unicode-bidi="embed">&#9;&#9;&#9;&#9;return book;</tspan>
</text>
</g>
<g>
<path fill="#C04040" stroke="#602020" stroke-width="5" stroke-dasharray="none" d="M 2736,2880 L 2196,3960 L 3600,3960 L 4140,2880 Z"/>
<text x="3168" y="2901" fill="#FFFFFF" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="3168" dy="72" unicode-bidi="embed">Output prev-&gt;next = book-&gt;</tspan>
<tspan x="3168" dy="72" unicode-bidi="embed">next</tspan>
<tspan x="3168" dy="72" unicode-bidi="embed">;&#13;</tspan>
<tspan x="3168" dy="72" unicode-bidi="embed">&#9;&#9;&#9;free(book); //</tspan>
<tspan x="3168" dy="72" unicode-bidi="embed"> free</tspan>
<tspan x="3168" dy="72" unicode-bidi="embed">():&#37322;&#25918;&#36164;&#28304;&#13;</tspan>
<tspan x="3168" dy="72" unicode-bidi="embed">&#9;&#9;&#9;printf</tspan>
<tspan x="3168" dy="72" unicode-bidi="embed">(&quot;&#24050;&#23558;&#26087;&#20070;&#22788;&#29702;&#25481;!\</tspan>
<tspan x="3168" dy="72" unicode-bidi="embed">n&quot;);&#13;</tspan>
<tspan x="3168" dy="72" unicode-bidi="embed">&#9;&#9;&#9;printf(&quot;&#25353;&#20219;&#24847;&#38190;&#36820;&#22238;\</tspan>
<tspan x="3168" dy="72" unicode-bidi="embed">n&quot;);&#13;</tspan>
<tspan x="3168" dy="72" unicode-bidi="embed">&#9;&#9;&#9;getchar</tspan>
<tspan x="3168" dy="72" unicode-bidi="embed">();&#13;</tspan>
<tspan x="3168" dy="72" unicode-bidi="embed">&#9;&#9;&#9;return book1;</tspan>
</text>
</g>
<ellipse cx="4212" cy="4104" rx="36" ry="36" fill="#FFD0D0" stroke="#A07070" stroke-width="5"/>
<text x="4644" y="2505" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="4644" dy="72" unicode-bidi="embed">True</tspan>
</text>
<text x="3762" y="2505" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="3762" dy="72" unicode-bidi="embed">False</tspan>
</text>
</g>
<g>
<path fill="#C04040" stroke="#602020" stroke-width="5" stroke-dasharray="none" d="M 1152,2448 L 1008,2736 L 1800,2736 L 1944,2448 Z"/>
<text x="1476" y="2469" fill="#FFFFFF" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1476" dy="72" unicode-bidi="embed">Output prev = book</tspan>
<tspan x="1476" dy="72" unicode-bidi="embed">;&#13;</tspan>
<tspan x="1476" dy="72" unicode-bidi="embed">&#9;&#9;book = book-&gt;next;</tspan>
</text>
</g>
<ellipse cx="2088" cy="4284" rx="36" ry="36" fill="#C04040" stroke="#602020" stroke-width="5"/>
<text x="2556" y="2073" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="2556" dy="72" unicode-bidi="embed">True</tspan>
</text>
<text x="1602" y="2073" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1602" dy="72" unicode-bidi="embed">False</tspan>
</text>
</g>
<g>
<path fill="#FFE0A0" stroke="#A08040" stroke-width="5" stroke-dasharray="none" d="M 504,1800 L 432,1872 L 504,1944 L 1008,1944 L 1080,1872 L 1008,1800 Z"/>
<text x="756" y="1821" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="756" dy="72" unicode-bidi="embed">book!=NULL</tspan>
</text>
</g>
<text x="1188" y="1749" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1188" dy="72" unicode-bidi="embed">True</tspan>
</text>
<text x="630" y="1965" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="630" dy="72" unicode-bidi="embed">False</tspan>
</text>
</g>
<g>
<path fill="#C04040" stroke="#602020" stroke-width="5" stroke-dasharray="none" d="M 396,4572 L 144,5076 L 1116,5076 L 1368,4572 Z"/>
<text x="756" y="4593" fill="#FFFFFF" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="756" dy="72" unicode-bidi="embed">Output printf</tspan>
<tspan x="756" dy="72" unicode-bidi="embed">(&quot;&#27809;&#26377;&#25214;&#21040;&#35813;&#22270;&#20070;\</tspan>
<tspan x="756" dy="72" unicode-bidi="embed">n&quot;);&#13;</tspan>
<tspan x="756" dy="72" unicode-bidi="embed">&#9;printf(&quot;&#25353;&#20219;&#24847;&#38190;&#36820;&#22238;\</tspan>
<tspan x="756" dy="72" unicode-bidi="embed">n&quot;);&#13;</tspan>
<tspan x="756" dy="72" unicode-bidi="embed">&#9;getchar();</tspan>
</text>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 13 KiB

@ -1,19 +0,0 @@
#ifndef
#define
#endif
Loading…
Cancel
Save