Compare commits
1 Commits
Author | SHA1 | Date |
---|---|---|
|
ad0865d010 | 2 years ago |
@ -0,0 +1,24 @@
|
||||
void foundBook(Book* book1)
|
||||
{
|
||||
Book* book = book1;
|
||||
printf("输入要查找的书的id:");
|
||||
int id;
|
||||
scanf("%d", &id);
|
||||
getchar();
|
||||
while (book != NULL)
|
||||
{
|
||||
if (id == book->iNum)
|
||||
{
|
||||
printf("该书的信息如下:\n");
|
||||
printf("%d\t%s\t%s\t%s\t%d\n", book->iNum, book->acName, book->acAuthor, book->acPress, book->iAmount);
|
||||
printf("按任意键返回\n");
|
||||
getchar();
|
||||
return;
|
||||
}
|
||||
book = book->next;
|
||||
}
|
||||
printf("没有找到该书!\n");
|
||||
printf("按任意键返回\n");
|
||||
getchar();
|
||||
return;
|
||||
}
|
Loading…
Reference in new issue