⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 surface_stu.c.bak

📁 图书管理系统  给予文件的 可以运行的  在MINGW上运行
💻 BAK
字号:
/* file_name:	surface_stu.c
 * author:	wangtiezhen miuliang @ Xidian University
 * description:	
 */
int bb_borrowed(bbpointer root, int snum)
{
	
//	putchar('j');
	if(root == NULL)
	{
		return 0;
	}
	
	bb_borrowed (root->lchild, snum );
	if(root -> snum == snum){
		struct book* p = find_book_num(bookbt, root->bnum);
		printf("书号:%d,书名:%s,作者:%s,价格:%d\n",p->bnum, p->bname, p->bwriter, p->bprice);
	}
	bb_borrowed (root->rchild, snum );
	
}
 
int print_book_for_stu(struct book* book)
{
}
int surface_stu_search_book()
{
	printf("请选择搜索方式:\n"
	"1.书号\n"
	"2.书名\n"
	"3.作者\n");
	int i, n;
	char c[20];
	struct book* p = NULL;
	scanf("%d", &i);
	switch(i){
		case 1:
			printf("请输入书号:");
			scanf("%d", &n);
			p = find_book_num(bookbt, n);
			printf("书号:%d,书名:%s,作者:%s,价格:%d\n",p->bnum, p->bname, p->bwriter, p->bprice);
			break;
		case 2:
			printf("请输入书名:");
			scanf("%s", c);
			p = find_book_name(bookbt, c);
			printf("书号:%d,书名:%s,作者:%s,价格:%d\n",p->bnum, p->bname, p->bwriter, p->bprice);
			break;
		case 3:
			printf("请输入作者:");
			scanf("%s", c);
			p = find_book_writer(bookbt, c);
			printf("书号:%d,书名:%s,作者:%s,价格:%d\n",p->bnum, p->bname, p->bwriter, p->bprice);
			break;
	}
}
int student_surface()
{
	int next = 1;
        while(next){
	        printf("请选择:\n"
	        "1.我的信息.\n"
	        "2.搜索书的信息.\n"
	        "3.所借书的信息.\n"
	        "4.修改密码.\n"
	        "5.返回.\n");
	        int i;
	        scanf("%d", &i);
	        switch(i){
	        	case 1:{
	        		struct stu* p = find_stu_num(stubt, user.id);
	        		int n = bb_stu_borrow_num(bbbt, user.id);
	        		printf("您好%s,您的借书号为%d,您总计借书%d本\n",  p->name,p->num, n);
	        		break;
	        	}
	        	case 2:{
	        		surface_stu_search_book();
	        		break;
	        	}
	        	case 3:{
	        		bb_borrowed(bbbt, user.id);
	        		break;
	        	}
	        	case 4:{
	        		
	        		break;
	        	}
	        	case 5:{
	        		next = 0;
	        		break;
	        	}
        		
        	}
        }
        if(next == 0)
        	return -1;
	        		
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -