admin管理员组文章数量:1794759
C语言图书管理系统课设
项目说明
本系统基于C语言开发,适用于刚入门的C语言新手项目课设,开发软件采用VC++6.0开发,VS,DEV C++等均可运行。
项目运行截图
代码界面截图
部分关键代码:
int search_history(char no[],char issn[],struct History **history_p1,struct History **history_p2)//p1为前一个指针,p2是待查项指针
{
int flag=0;//标记找没找到,初始值0
*history_p1=*history_p2=history_head;
if(strcmp(issn,"ALL")==0)
{
while(*history_p2!=NULL)
{
if((strcmp(no,(*history_p2)->no)==0))
{
flag=1;
printf("学号:%s issn编号:%s\\n借书日期:%d/%d/%d\\n还书日期:%d/%d/%d\\n违约金:%lf\\n",
(*history_p2)->no,(*history_p2)->issn,
(*history_p2)->borrow_date.year,(*history_p2)->borrow_date.month,(*history_p2)->borrow_date.day,
(*history_p2)->return_date.year,(*history_p2)->return_date.month,(*history_p2)->return_date.day,
(*history_p2)->penalty);
puts("**********************");
}
*history_p1=*history_p2;
*history_p2=(*history_p1)->next;
}
puts("**********************");
system("pause");
}
else
{
while(*history_p2!=NULL)
{
if(strcmp(no,(*history_p2)->no)==0&&strcmp(issn,(*history_p2)->issn)==0&&(*history_p2)->return_date.year==0)//学号找到,书号找到,且没有还书
{
flag=1;
break;//找到,跳出
}
*history_p1=*history_p2;
*history_p2=(*history_p1)->next;
}
if(flag)//找到了
{
puts("找到此记录");
printf("学号:%s issn编号:%s\\n借书日期:%d/%d/%d\\n还书日期:%d/%d/%d\\n违约金:%lf\\n",
(*history_p2)->no,(*history_p2)->issn,
(*history_p2)->borrow_date.year,(*history_p2)->borrow_date.month,(*history_p2)->borrow_date.day,
(*history_p2)->return_date.year,(*history_p2)->return_date.month,(*history_p2)->return_date.day,
(*history_p2)->penalty);
}
else
puts("无此记录!!!");
system("pause");
}
return flag;
}
获取完整源码:
链接:pan.baidu/s/1rtA4PiGJ5ns-glCSgCcBsA 提取码:rsxt
版权声明:本文标题:C语言图书管理系统课设 内容由林淑君副主任自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.xiehuijuan.com/baike/1686890499a114922.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论