From c59a376524993cf35fb3b56e207393eb273c0f11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=B1=9F=E6=A5=A0?= <87896121@qq.com> Date: Sun, 21 May 2023 10:22:21 +0800 Subject: [PATCH] C2 --- 图书管理系统.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/图书管理系统.c b/图书管理系统.c index 65fd211..c496dd2 100644 --- a/图书管理系统.c +++ b/图书管理系统.c @@ -73,6 +73,26 @@ void ShowMainMenu() } //C2 +void ShowLibInfo(const Book* book1, const Reader* reader1) +{ + Book* book = book1; + Reader* reader = reader1; + int bookNUm = 0, readerNUm = 0, mangerNUm = 0; + while (book != NULL) + { + bookNUm++; + book = book->next; + } + while (reader != NULL) + { + readerNUm++; + reader = reader->next; + } + printf("本图书馆共有藏书%d本,读者%d人\n", bookNUm, readerNUm); + printf("按任意键返回\n"); + getchar(); + return; +} //C3