学 海 无 涯 ; main() { printf("*******************欢迎使用 DVD 信息管理系统**********************\n"); printf("\n\n\n\n 请输入管理员密码:"); if(check()) menu1(); else {printf(" 密码输入错误\n"); printf(" ****************你无权使用本系统*****************\n"); quit(); } } int check() /* 验证会员密码*/ { char a[20],str[]="123"; /*注意: 会员初始密码为 123*/ int count; for(count=0;count<3;count++) { gets(a); if(strcmp(a,str)==0) return 1 ; else continue; } return 0; }
int menu1() /*主函数功能菜单*/ { ;3;printf("请输入增加会员档案的个数:"); scanf("%d",&a);
for(i=n;i
}if((fp=fopen("huiyuan.txt","a+"))==NULL){printf("cannot open file"); exit(0);} for(i=n;i
5 缴费模块;monfei(){FILE *fp,*fp1; int i,c;char name[20];struct dvdA stu2[100];printf("\n 请 输 入 会 员 姓 名 :\n"); scanf("%s",&name); if((fp=fopen("huiyuan.txt","r+"))==NULL){printf("cannot open file"); exit(0);}for(i=0;i
if((fp=fopen("huiyuan.txt","w+"))==NULL){printf("c