#include <stdlib.h>
unsigned char *name = "admin"
unsigned char *password = "admin"
unsigned char name_input[56] = {0}
unsigned char password_input[56] = {0}
void main(void)
{
while(1)
{
memset(name_input, 0, sizeof(name_input))
memset(password_input, 0, sizeof(password_input))
printf("请输入账号密码,空格分割\n")
scanf("%s %s", name_input, password_input)
if((strcmp(name, name_input) == 0) && (strcmp(password, password_input) == 0))
{
printf("welcome,admin\n")
return
}
else
{
printf("name or password error\n")
}
}
}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)