forked from m8mvbo72w/test
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
507 B
24 lines
507 B
2 years ago
|
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;
|
||
|
}
|