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

📄 temp_surface.c

📁 图书管理系统
💻 C
📖 第 1 页 / 共 3 页
字号:
/* file_name:	surface.c
 * author:	wangtiezhen miuliang @ Xidian University
 * description:	The main part of the surface;
 */

int main_surface_temp(void) {
        if(user.type == student) {
                printf("the system is being developing, you can not borrow books presenr, sorry.\n");
        } else {
                printf("hurry up! the system can not use present!\n");
        }


        //
        //	struct stu* p = find_stu_name(stubt, "xiao322");
        //	print_stu(p);
        ////
        //	stu_del_value(&stubt, 322);
        //////	if(p == NULL){
        //////		printf("NULL\n");
        //////	}else if(p == bookbt){
        //////		printf("bookbt\n");
        //////	}else{
        //////		printf("error\n");
        //////	}
        ////
        //	struct bb *p = find_bb_bnum(bbbt, 56);
        //	print_bb(p);
        //	print_book(find_book_num(bookbt, p->bnum));

        //	char *n_name = "bush";
        //	stu_update(78,
        //			n_name, NULL,
        //			NULL, NULL,
        //			NULL);
        //

        //	bb_del_value(&bbbt, 56);
        //	p = find_bb_bnum(bbbt, 56);
        //	print_bb(p);

        //	print_book(find_book_num(bookbt, p->bnum));
        //	struct stu * pb = find_stu_name(stubt, n_name);
        //	print_stu(pb);

        tree_visit_bb(bbbt, print_bb, 1);
        //	int i = bb_stu_borrow_num(bbbt, 124);
        //	printf("%d", i);
        super_destory((void**)&bbbt,bb);
        printf("%p\n", bbbt);

        return 0;
}
int temp_main_surface(void) {
        struct stu *stubt=NULL,*p;
        struct book *bookbt=NULL,*q;
        struct bb *bbbt=NULL,*pi;
        struct teacher *teacherbt=NULL,*teacher;
        int num,password,age,newpassword1,newpassword2,password0;
        char name[20],addr[20];
        char id[7],bname[20],bwriter[20];
        int  idnum;
        int no,bnum,price,snum;
loop1: {
//                printf("input your ID:\n");
//                scanf("%s",id);
//                
//                        printf("Please input your ID number:\n");
//                        scanf("%d",idnum);
//                        p=find_stu_num(stubt,idnum);
//                        if(p==NULL) {
//                                printf("Sorroy you have no right to visit.\n");
//                                goto loop1;
//                        } else {
//                                printf("Please input your password:\n");
//                                scanf("%d",&password);
//                                p=find_stu_num(stubt,idnum);
//                                if(password==p->password)
//                                        goto loop3;
//                                if(password!=p->password) {
//                                        printf("Please input your password:\n");
//                                        scanf("%d",&password);
//                                        p=find_stu_num(stubt,idnum);
//                                        if(password==p->password)
//                                                goto loop3;
//                                        if(password!=p->password) {
//                                                printf("Please input your password:\n");
//                                                scanf("%d",&password);
//                                                p=find_stu_num(stubt,idnum);
//                                                if(password==p->password)
//                                                        goto loop3;
//                                                else {
//                                                        printf("Sorroy you cann't in.\n");
//                                                        goto loop1;
//                                                }
//                                        }
//                                }
loop3:	   {
                                        printf("Please input your commmand:\n1.search your information.\n2.search your information of  book.\n3.search information of borrowing book.\n4.change your password.\n5.return.\n");
                                        scanf("%d",&no);
                                        switch(no) {
                                        case 1: {
                                                        p=find_stu_num(stubt,idnum);
                                                        printf("%d %d %s",p->num,p->password,p->name);
                                                        printf("1.Go.2.Return.\n");
                                                        scanf("%d",&no);
                                                        if(no==1)
                                                                goto loop3;
                                                        if(no==2)
                                                                goto loop1;
                                                        break;
                                                }
                                        case 2: {
loop4: {
                                                                printf("Please input yourtype:\n1.book number\n2.bookname\n3.bookwriiter\n4.return.\n");
                                                                scanf("%d",&no);
                                                                switch(no) {
                                                                case 1: {
                                                                                printf("Please input book number:\n");
                                                                                scanf("%d",&bnum);
                                                                                q=find_book_num(bookbt,bnum);
                                                                                if(q==NULL)
                                                                                        printf("Sorroy it isn't exist.\n");
                                                                                else
                                                                                        printf("%d %s %s %d",q->bnum,q->bname,q->bwriter,q->bprice);
                                                                                printf("1.Go 2.Return.\n");
                                                                                scanf("%d",&no);
                                                                                if(no==1)
                                                                                        goto loop4;
                                                                                if(no==2)
                                                                                        goto loop3;
                                                                                break;
                                                                        }
                                                                case 2: {
                                                                                printf("Please input book name:\n");
                                                                                scanf("%s",bname);
                                                                                q=find_book_name(bookbt,bname);
                                                                                if(q==NULL)
                                                                                        printf("Sorroy it isn't exist.\n");
                                                                                else
                                                                                        printf("%d %s %s %d",q->bnum,q->bname,q->bwriter,q->bprice);
                                                                                printf("1.Go 2.Return.\n");
                                                                                scanf("%d",&no);

⌨️ 快捷键说明

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