#include<stdio.h>
#include<string.h>
int main()
{
char arr1[] = "123456";
char arr2[10];
int i = 0;
printf("please input the passwd:>");
for (i = 0; i < 3; i++)
{
scanf("%s",&arr2);
if (strcmp(arr1, arr2) == 0)
{
printf("login success!\n");
break;
}
else
printf("passwd error,try again\n");
}
if (i == 3)
{
return 0;
}
system("pause");
return 0;
}