From 9003a33ecd2ff76a891b3aad95724d50d81884f3 Mon Sep 17 00:00:00 2001 From: iridiumR Date: Fri, 8 Oct 2021 17:26:01 +0800 Subject: [PATCH] =?UTF-8?q?3=E4=BD=9C=E4=B8=9A=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ex3/ex3.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ex3/ex3.cpp b/ex3/ex3.cpp index c7463ff..39fbeff 100644 --- a/ex3/ex3.cpp +++ b/ex3/ex3.cpp @@ -18,7 +18,7 @@ int main() v.printall(); while (1) { - printf("选择操作:1.插入 2.删除 3.统计\n"); + printf("选择操作:1.插入 2.删除 3.统计 4.退出\n"); scanf("%d", &flag); switch (flag) @@ -45,6 +45,9 @@ int main() (temp[1] != -1) ? (printf("一共%d个\n", temp[1])) : (printf("无此元素或超出范围\n")); break; + case 4: + return 0; + default: printf("返回菜单\n"); }