master
1342552657@qq.com 6 years ago
parent e24355908d
commit 8cb12edaa1

@ -0,0 +1 @@
aa aa 1-2-2524 25 52 52 cc

@ -6,6 +6,7 @@
#include<time.h>
#include<dos.h>
#include<conio.h>
#include<ctype.h>
#define N 100
void menu();
@ -49,7 +50,7 @@ void tushuluru()
void ss();
j=0;
printf("请输入你要插入的图书信息\n");
printf("在录入图书年月日信息时:请这样输入日 月 年\n");
printf("在录入图书年月日信息时:请这样输入日 月 年\n");
printf("名称\t作者\t日-月-年\t价格\t数量\t库存\t出版社\n");
FILE*fp;
out:
@ -86,13 +87,13 @@ void huanyingxitong()
void ss()//图书管理系统界面
{
int x,y;
system("cls");
printf("\t\t\t\t\t\t\t\t\t\t\n");
printf("\n \t\t\t\t请按键 1-5选择实现功能\n\n");
printf(" \t\t\t1.图书信息录入\n\n");
printf(" \t\t\t2.图书信息浏览\n\n");
printf(" \t\t\t3.按书名查询图书查询\n\n");
printf(" \t\t\t4.图书单价的修改与图书信息删除\n\n");
system("cls");
printf("\t\t\t\t\t\t\t\t\t\t\n");
printf("\n \t\t\t\t请按键 1-5选择实现功能\n\n");
printf(" \t\t\t1.图书信息录入\n\n");
printf(" \t\t\t2.图书信息浏览\n\n");
printf(" \t\t\t3.按书名查询图书查询\n\n");
printf(" \t\t\t4.图书单价的修改与图书信息删除\n\n");
printf(" \t\t\t5.退出系统AND欢迎词\n\n");
printf("请输入你要选择的菜单\n");
printf("\n");
@ -165,7 +166,7 @@ void xinxixiugai()
{
printf("你输入错误,请重新输入\n");
goto ww;
}
}
}
void tushuxinxixiugai()
{
@ -178,15 +179,15 @@ xx:
j=0;
fp=fopen("a.txt","r+");
while(!feof(fp))
{
{
fscanf(fp,"%s%s%d%d%d%d%d%d%s",tushuxinxu[j].name,tushuxinxu[j].author,&tushuxinxu[j].year,&tushuxinxu[j].yue,&tushuxinxu[j].ri,&tushuxinxu[j].price,&tushuxinxu[j].amount,&tushuxinxu[j].kuchun,tushuxinxu[j].publisher);
j++;
}
rewind(fp);
fclose(fp);
CC=fopen("a.txt","w+");
CC=fopen("a.txt","w+");
printf("请问你想改正的单价是:");
scanf("%d",&q);
scanf("%d",&q);
for(h=0;h<j;h++)
{
if(tushuxinxu[h].price==q)
@ -209,7 +210,7 @@ while(tushuxinxu[z].price!=0)
z++;
}
rewind(CC);
fclose(CC);
fclose(CC);
printf("你是否想继续修改\n");
printf("如果是请输入1;返回菜单请输入:2\n");
scanf("%d",&i);
@ -222,7 +223,7 @@ if(i==2)
system("cls");
ss();
}
}
}
void tushuxinxishanchu()
{
int j,h,d,e,z,s,q;
@ -314,38 +315,38 @@ out :
goto out;
}
}
void menu()
{
int p;
void menu()
{
int p;
char ch,pwd[256];
char c[] = {"111222"};
while(1)
{
system("cls");
char c[] = {"111222"};
while(1)
{
system("cls");
p=0;
system("color 2");
system("color 0");
printf("*******系统登录界面*************\n");
printf(" 请输入密码:\n");
printf(" 请输入密码:\n");
goto_xy(18,1);
while((ch=getch())!='\r')
{
if(ch==8)
{
putchar('\b');
putchar(' ');
putchar('\b');
if(p>0)
p--;
}
if(!isdigit(ch)&&!isalpha(ch))
while((ch=getch())!='\r')
{
if(ch==8)
{
putchar('\b');
putchar(' ');
putchar('\b');
if(p>0)
p--;
}
if(!isdigit(ch)&&!isalpha(ch))
continue;
putchar('*');
pwd[p++]=ch;
}
pwd[p]=0;
putchar('*');
pwd[p++]=ch;
}
pwd[p]=0;
if(strcmp(c,pwd)==0)
{
system("color 2");
system("color 0");
printf("\n输入密码正确\n");
p=0;
system("cls");
@ -353,11 +354,11 @@ void menu()
}
else
{
system("color 2");
system("color 0");
system("cls");
printf("******密码错误!*******\n");
printf("******密码错误!*******\n");
system("pause");
}
}
}
}
@ -400,7 +401,7 @@ void shumingchaxun()
int h,j,z,count;
j=0;
h=0;
char an[100];
FILE*fp;
fp=fopen("a.txt","r");
@ -511,51 +512,55 @@ xx:
}
}
void welcome()
{
Sleep(200);
system("color A");
printf("\n\n\n\n\n \t\t");
Sleep(200);
system("color B");
printf("\t") ;
Sleep(200);
system("color C");
printf("\t") ;
Sleep(200);
system("color D");
printf("\t") ;
Sleep(200);
system("color E");
printf("\t") ;
Sleep(200);
system("color A");
printf("\t") ;
Sleep(200);
system("color B");
printf("\t");
Sleep(200);
system("color A");
printf("\t");
Sleep(200);
system("color 08");
printf("\t") ;
Sleep(200);
system("color 09");
printf("\t") ;
Sleep(200);
system("color B");
printf("\t") ;
Sleep(200);
system("color F");
printf("\t\n") ;
}
void welcome()
{
Sleep(200);
system("color A");
printf("\n\n\n\n\n \t\t");
Sleep(200);
system("color B");
printf("\t") ;
Sleep(200);
system("color C");
printf("\t") ;
Sleep(200);
system("color D");
printf("\t") ;
Sleep(200);
system("color E");
printf("\t") ;
Sleep(200);
system("color A");
printf("\t") ;
Sleep(200);
system("color B");
printf("\t");
Sleep(200);
system("color A");
printf("\t");
Sleep(200);
system("color 08");
printf("\t") ;
Sleep(200);
system("color 09");
printf("\t") ;
Sleep(200);
system("color B");
printf("\t") ;
Sleep(200);
system("color F");
printf("\t\n") ;
}
int main()
{
welcome();
system("cls");
system("cls");
menu();
return 0;
return 0;
}

Binary file not shown.
Loading…
Cancel
Save