模拟115登陆纯C(语言)版。
-----------------------------源码,别喷啊,写的不好别骂我,仅供参考和娱乐-----------------------------------
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <conio.h>
void main()
{
int i;char id[20],psw[20];
while(1)
{
printf("\n\n >> 115账号:");
gets(id);
printf("\n >> 密 码:");
for(i=0;i<19;i++)
{psw[i]=getch();
if(psw[i]!='\15'&&psw[i]!='\b')
putchar('*');
else if(psw[i]=='\b')
{ if(i!=0)
printf("\b \b");
i-=2;
if(i==-2)
i=-1;
}
else break;
}
psw[i]='\0';
if(((strcmp(id," ")==0)&&(strcmp(psw,"hello")==0))||((strcmp(id," ")==0)&&(strcmp(psw,"ylmf")==0))
||((strcmp(id," ")==0)&a&(strcmp(psw,"fudekun")==0))||((strcmp(id," ")==0)&&(strcmp(psw,"littersmall")==0)))
{printf("\n\n\n <<<恭喜您,验证通过!>>>\n\n");
break;}
else {printf("\n\n\n Sorry,账号或密码不正确!请按回车键重新输入!");
while(1)
{if(getch()=='\15')
{system("cls");
break;
}
}
}
}
printf("\n **************************************************");
printf("\n * *");
printf("\n * welcome to 115,hope you have a nice time !!! *");
printf("\n * *");
printf("\n * 欢 迎 您 来 到 1 1 5 ,祝 您 玩 得 愉 快 !!! *");
printf("\n * *");
printf("\n **************************************************\n\n\n\n\n\n\n");
}
----------------------------------------------分割线-----------------------------------------------
77777115 回复含违规内容 只看该作者 举报
77777115