Skip to content

Commit

Permalink
♻️ 更新PressEnterToContinue函数
Browse files Browse the repository at this point in the history
  • Loading branch information
kangjianwei committed Feb 14, 2020
1 parent decad4a commit af40093
Show file tree
Hide file tree
Showing 134 changed files with 1,326 additions and 1,367 deletions.
24 changes: 12 additions & 12 deletions CLion/CourseBook/0201_SqList/SqList-main.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ int main(int argc, char** argv) {
printf("█ 初始化顺序表 L ...\n");
InitList(&L);
}
PressEnterToContinue();
PressEnterToContinue(debug);


printf("████████ ListEmpty \n");
Expand All @@ -34,7 +34,7 @@ int main(int argc, char** argv) {
printf("█ L 不为空!\n");
}
}
PressEnterToContinue();
PressEnterToContinue(debug);


printf("████████ ListInsert \n");
Expand All @@ -44,23 +44,23 @@ int main(int argc, char** argv) {
ListInsert(&L, i, 2 * i);
}
}
PressEnterToContinue();
PressEnterToContinue(debug);


printf("████████ ListTraverse \n");
{
printf("█ L 中的元素为:L = ");
ListTraverse(L, PrintElem);
}
PressEnterToContinue();
PressEnterToContinue(debug);


printf("████████ ListLength \n");
{
i = ListLength(L);
printf("█ L 的长度为 %d \n", i);
}
PressEnterToContinue();
PressEnterToContinue(debug);


printf("████████ ListDelete \n");
Expand All @@ -79,23 +79,23 @@ int main(int argc, char** argv) {
printf("█ 删除后的元素:L = ");
ListTraverse(L, PrintElem);
}
PressEnterToContinue();
PressEnterToContinue(debug);


printf("████████ GetElem \n");
{
GetElem(L, 4, &e);
printf("█ L 中第 4 个位置的元素为 \"%d\" \n", e);
}
PressEnterToContinue();
PressEnterToContinue(debug);


printf("████████ LocateElem \n");
{
i = LocateElem(L, 7, CmpGreater);
printf("█ L 中第一个元素值大于 \"7\" 的元素是 \"%d\" \n", L.elem[i - 1]);
}
PressEnterToContinue();
PressEnterToContinue(debug);


printf("████████ PriorElem \n");
Expand All @@ -108,7 +108,7 @@ int main(int argc, char** argv) {
printf("█ 元素 \"%d\" 的前驱不存在!\n", cur_e);
}
}
PressEnterToContinue();
PressEnterToContinue(debug);


printf("████████ NextElem \n");
Expand All @@ -121,7 +121,7 @@ int main(int argc, char** argv) {
printf("█ 元素 \"%d\" 的后继不存在!\n", cur_e);
}
}
PressEnterToContinue();
PressEnterToContinue(debug);


printf("████████ ClearList \n");
Expand All @@ -142,7 +142,7 @@ int main(int argc, char** argv) {
printf(" L 不为空!\n");
}
}
PressEnterToContinue();
PressEnterToContinue(debug);


printf("████████ DestroyList \n");
Expand All @@ -163,7 +163,7 @@ int main(int argc, char** argv) {
printf(" L 不存在!!\n");
}
}
PressEnterToContinue();
PressEnterToContinue(debug);


return 0;
Expand Down
1 change: 0 additions & 1 deletion CLion/CourseBook/0202_Union/Union.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include "Status.h" //**▲01 绪论**//
#include "SqList.h" //**▲02 线性表**//


/*
* ████████ 算法2.1 ████████
*
Expand Down
1 change: 0 additions & 1 deletion CLion/CourseBook/0203_MergeSqList/MergeSqList.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

#include "MergeSqList.h" //**▲02 线性表**//


/*
* ████████ 算法2.2 ████████
*
Expand Down
1 change: 0 additions & 1 deletion CLion/CourseBook/0203_MergeSqList/MergeSqList.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include <stdlib.h>
#include "SqList.h" //**▲02 线性表**//


/*
* ████████ 算法2.2 ████████
*
Expand Down
28 changes: 14 additions & 14 deletions CLion/CourseBook/0204_LinkList/LinkList-main.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ int main(int argc, char** argv) {
printf("█ 初始化单链表 L ...\n");
InitList(&L);
}
PressEnterToContinue();
PressEnterToContinue(debug);


printf("████████ ListEmpty \n");
{
ListEmpty(L) ? printf("█ L 为空!!\n") : printf("█ L 不为空!\n");
}
PressEnterToContinue();
PressEnterToContinue(debug);


printf("████████ ListInsert \n");
Expand All @@ -40,22 +40,22 @@ int main(int argc, char** argv) {
ListInsert(L, i, 2 * i);
}
}
PressEnterToContinue();
PressEnterToContinue(debug);


printf("████████ ListTraverse \n");
{
printf("█ L 中的元素为:L = ");
ListTraverse(L, PrintElem);
}
PressEnterToContinue();
PressEnterToContinue(debug);


printf("████████ ListLength \n");
{
printf("█ L 的长度为 %d \n", ListLength(L));
}
PressEnterToContinue();
PressEnterToContinue(debug);


printf("████████ ListDelete \n");
Expand All @@ -74,15 +74,15 @@ int main(int argc, char** argv) {
printf("█ 删除后的元素:L = ");
ListTraverse(L, PrintElem);
}
PressEnterToContinue();
PressEnterToContinue(debug);


printf("████████ GetElem \n");
{
GetElem(L, 4, &e);
printf("█ L 中第 4 个位置的元素为 \"%d\" \n", e);
}
PressEnterToContinue();
PressEnterToContinue(debug);


printf("████████ LocateElem \n");
Expand All @@ -91,7 +91,7 @@ int main(int argc, char** argv) {
GetElem(L, i, &e);
printf("█ L 中第一个元素值大于 \"7\" 的元素是 \"%d\" \n", e);
}
PressEnterToContinue();
PressEnterToContinue(debug);


printf("████████ PriorElem \n");
Expand All @@ -104,7 +104,7 @@ int main(int argc, char** argv) {
printf("█ 元素 \"%d\" 的前驱不存在!\n", cur_e);
}
}
PressEnterToContinue();
PressEnterToContinue(debug);


printf("████████ NextElem \n");
Expand All @@ -117,7 +117,7 @@ int main(int argc, char** argv) {
printf("█ 元素 \"%d\" 的后继不存在!\n", cur_e);
}
}
PressEnterToContinue();
PressEnterToContinue(debug);


printf("████████ ClearList \n");
Expand All @@ -130,7 +130,7 @@ int main(int argc, char** argv) {
printf("█ 清空 L 后:");
ListEmpty(L) ? printf(" L 为空!!\n") : printf(" L 不为空!\n");
}
PressEnterToContinue();
PressEnterToContinue(debug);


printf("████████ DestroyList \n");
Expand All @@ -143,7 +143,7 @@ int main(int argc, char** argv) {
printf("█ 销毁 L 后:");
L ? printf(" L 存在!\n") : printf(" L 不存在!!\n");
}
PressEnterToContinue();
PressEnterToContinue(debug);


printf("████████ CreateList_Head \n");
Expand All @@ -153,7 +153,7 @@ int main(int argc, char** argv) {
printf("█ 头插法建立单链表 L = ");
ListTraverse(L, PrintElem);
}
PressEnterToContinue();
PressEnterToContinue(debug);


printf("████████ CreateList_Tail \n");
Expand All @@ -163,7 +163,7 @@ int main(int argc, char** argv) {
printf("█ 尾插法建立单链表 L = ");
ListTraverse(L, PrintElem);
}
PressEnterToContinue();
PressEnterToContinue(debug);

return 0;
}
Expand Down
24 changes: 12 additions & 12 deletions CLion/CourseBook/0206_SLinkList/SLinkList-main.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ int main(int argc, char** argv) {
printf("█ 初始化单链表 S ...\n");
InitList(space, &S);
}
PressEnterToContinue();
PressEnterToContinue(debug);


printf("████████ ListEmpty \n");
{
ListEmpty(space, S) ? printf("█ S 为空!!\n") : printf("█ S 不为空!\n");
}
PressEnterToContinue();
PressEnterToContinue(debug);


printf("████████ ListInsert \n");
Expand All @@ -42,22 +42,22 @@ int main(int argc, char** argv) {
ListInsert(space, S, i, 2 * i);
}
}
PressEnterToContinue();
PressEnterToContinue(debug);


printf("████████ ListTraverse \n");
{
printf("█ S 中的元素为:S = ");
ListTraverse(space, S, PrintElem);
}
PressEnterToContinue();
PressEnterToContinue(debug);


printf("████████ ListLength \n");
{
printf("█ S 的长度为 %d \n", ListLength(space, S));
}
PressEnterToContinue();
PressEnterToContinue(debug);


printf("████████ ListDelete \n");
Expand All @@ -76,15 +76,15 @@ int main(int argc, char** argv) {
printf("█ 删除后的元素:S = ");
ListTraverse(space, S, PrintElem);
}
PressEnterToContinue();
PressEnterToContinue(debug);


printf("████████ GetElem \n");
{
GetElem(space, S, 4, &e);
printf("█ S 中第 4 个位置的元素为 \"%d\" \n", e);
}
PressEnterToContinue();
PressEnterToContinue(debug);


printf("████████ LocateElem \n");
Expand All @@ -93,7 +93,7 @@ int main(int argc, char** argv) {
GetElem(space, S, i, &e);
printf("█ S 中第一个元素值大于 \"7\" 的元素是 \"%d\" \n", e);
}
PressEnterToContinue();
PressEnterToContinue(debug);


printf("████████ PriorElem \n");
Expand All @@ -106,7 +106,7 @@ int main(int argc, char** argv) {
printf("█ 元素 \"%d\" 的前驱不存在!\n", cur_e);
}
}
PressEnterToContinue();
PressEnterToContinue(debug);


printf("████████ NextElem \n");
Expand All @@ -119,7 +119,7 @@ int main(int argc, char** argv) {
printf("█ 元素 \"%d\" 的后继不存在!\n", cur_e);
}
}
PressEnterToContinue();
PressEnterToContinue(debug);


printf("████████ ClearList \n");
Expand All @@ -132,7 +132,7 @@ int main(int argc, char** argv) {
printf("█ 清空 S 后:");
ListEmpty(space, S) ? printf(" S 为空!!\n") : printf(" S 不为空!\n");
}
PressEnterToContinue();
PressEnterToContinue(debug);


printf("████████ DestroyList \n");
Expand All @@ -145,7 +145,7 @@ int main(int argc, char** argv) {
printf("█ 销毁 S 后:");
S!=0 ? printf(" S 存在!\n") : printf(" S 不存在!!\n");
}
PressEnterToContinue();
PressEnterToContinue(debug);

return 0;
}
Expand Down
Loading

0 comments on commit af40093

Please sign in to comment.