#pragma warning(disable:4996)标签:自行,代码,mima,修改,登陆,printf,123456789,strcmp From: https://blog.51cto.com/u_15880518/5872075
#include<stdio.h>
int main()
{
char mima[100] = { 0 };
int i = 0;
for (i = 0;i < 3;i++)
{
printf("请输入密码:");
scanf("%s", mima);
if (strcmp(mima ,"123456789")==0)//strcmp-判断字符串是否相等/数字可自行修改
{
printf("登陆成功,欢迎回来,我亲爱的召唤师!\n");//文字可自行修改
break;
}
else if (strcmp(mima, "123456789") != 0)//数字修改要和上面的一样
{
printf("登陆失败,别TM丢人现眼,赶紧滚蛋!\n");//文字可自行修改
}
}
return 0;
}