我也不会自己做 用VB应该可以
用scanf应该是做不出来的
getch()代替scanf()
循环主体这样写:
long count = 0;
while(strcmp(u,"admin")!=0||strcmp(p,"123456")!=0)
{
if(count > 0)
{
if(count<3)
printf("用户名或者密码错误!请重新输入!\n");
else
exit();
}
int i ;
char in;
printf("\n请输入用户名:");
i = 0;
while((in = getch())!=13)
{
u[i++] = in;
printf("*");
}
u[i] ='\0';
printf("\n请输入密码:");
i = 0;
while((in = getch())!=13)
{
p[i++] = in;
printf("*");
}
p[i] ='\0';
}