#include<stdio.h>
#include<string.h>
int main()
{
int i;
char password[20] = { 0 };
for (i = 0; i < 3; i++){
scanf("%s", password);//==不能用来比较字符串,要用库函数strcmp
if (strcmp(password, "123456") == 0){
printf("登陆成功");
}
else printf("密码错误\n");
}
if (i == 3){
printf("连续三次登陆错误,登陆失败");
}
return 0;
}