void searchBook(struct Library *library) {
char title[20];
printf("请输入要查找的书名:");
scanf("%s", title);
for (int i = 0; i < library->count; i++) {
if (strcmp(library->books[i].title, title) == 0) {
printf("编号\t书名\t作者\t数量\t借阅状态\n");
printf("%d\t%s\t%s\t%d\t已借出%d本,现有%d本\n", library->books[i].id, library->books[i].title, library->books[i].author, library->books[i].number, library->books[i].borrow_num, library->books[i].now_num);
return;
}
}
printf("未找到该图书!\n");
}
【无标题】
最新推荐文章于 2024-09-03 18:29:17 发布