欢迎来到天天文库
浏览记录
ID:57026113
大小:26.00 KB
页数:6页
时间:2020-07-31
《登陆器源代码.doc》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、#include<stdio.h>#include<stdlib.h>#include<conio.h>#include<string.h>structuserInfo{characcount[20];charpassword[20];charquestio[50];charanswer[30];};structuserInfo1{characcoun[20];charpasswor[20];};structuserInfo2//Õâ¸öÀ´´æ·ÅÓÃ
2、»§ÕÒ»ØÃÜÂëʱ֮ÓõÄ{characcount[20];charpassword[20];charquestio[50];charanswer[30];};charqpwd[20];//ÕâÀïÊÇÉùÃ÷º¯Êýintdisplay();voidregistered(structuserInfo*p);intlogin(structuserInfo*p,structuserInfo1*pu);intfound(structuserInfo2*f,structuserInfo*p);in
3、tmain()//Ö÷º¯Êý{inti,j,k;structuserInfoa;structuserInfo1userLogin;structuserInfo2userFound;i=display();do{switch(i){case1:k=login(&a,&userLogin);break;//ÕâÀïµÄloginҪתÏòÈí¼þµÄÖ÷½çÃæcase2:registered(&a);break;//Õâ¸ÏÊÇʵÏÖ×¢²áµÄcase4:j=found(
4、&userFound,&a);break;//ÕâÀï½øҪʵÏÖÒªÕÒ»ØÃÜÂëµÄ}i=display();}while(1);return4;}intdisplay()//ÓÃÀ´ÏÔʾÖ÷²Ëµ¥{intn;printf("***************************************************");printf("---------------------------------------------
5、------");printf("**(1):µÇ½**");printf("**(2):×¢²á**");printf("**(3):°ïÖú**");//(3)ÓÃÀ´½éÉÜ´ËÈí¼þ£¬Ï൱ÓÚÒÔºóдµÄÎĵµ£¬ÒÔºóÔÙ×ö.printf("**(4):ÕÒ»ØÃÜÂë**");printf("------------------------------
6、---------------------");printf("***************************************************");do//°´ÒªÇóÊäÈ룬Èç¹ûÊäÈëÓÐÎó£¬ÔòÌáʾÖØÐÂÊäÈë{printf("ÇëÑ¡Ôñ:");scanf("%d",&n);while(n<1
7、
8、n>4){printf("ÊäÈëÓÐÎó£¬Ç
9、ëÖØÐÂÊäÈ룺");scanf("%d",&n);}}while(n<1
10、
11、n>4);returnn;}voidregistered(structuserInfo*p)//ÓÃÀ´×¢²áµÄ´úÂë,ÕâÀïÓ¦¸ÃÉèÒ»¸öÊý¾Ý¿â,ÕâÀïնʱÓÃÎļþÀ´´æ{FILE*fp;printf("ÇëÊäÈë:");printf("ÉêÇëÕʺÅ:");scanf("%s&
12、quot;,p->account);printf("ÃÜÂ룺");scanf("%s",p->password);printf("È·ÈÏÃÜÂ룺");scanf("%s",qpwd);printf("Ãܱ£ÎÊÌ⣺");scanf("%s",p->questio);printf("ÃÜÂë´ð
此文档下载收益归作者所有