Compare commits
No commits in common. 'fe0a344606a6b904bcf1582e65c9cfe28a7fc3f1' and '329b29d71de65c40814a6f1884b3f4e2b4c3337f' have entirely different histories.
fe0a344606
...
329b29d71d
@ -1,23 +0,0 @@
|
|||||||
// 查询图书信息
|
|
||||||
void query_data()
|
|
||||||
{
|
|
||||||
int id;
|
|
||||||
struct book *p;
|
|
||||||
|
|
||||||
printf("请输入要查询的图书编号:");
|
|
||||||
scanf("%d", &id);
|
|
||||||
|
|
||||||
p = find(id); // 查找编号为id的图书
|
|
||||||
if(p != NULL)
|
|
||||||
{
|
|
||||||
printf("图书信息如下:\n");
|
|
||||||
printf("图书编号:%d\n", p->id);
|
|
||||||
printf("图书名称:%s\n", p->name);
|
|
||||||
printf("图书作者:%s\n", p->author);
|
|
||||||
printf("图书价格:%.2f\n", p->price);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
printf("没有找到编号为%d的图书!\n", id);
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in new issue