#include <stdio.h>
int main()
{
int i=0;
char password[20]={0};
for(i=0;i<2;i++)
{
printf("请输入密码:");
scanf("%s",password);
if(strcmp(password,"520417")==0)
{
printf("密码正确\n");
break;
}
}
if(i==2)
printf("两次次密码输入错误,请退出程序\n");
return 0;
}
标签:int,对错,密码,printf,password,输入 From: https://www.cnblogs.com/xc0509/p/16867644.html