题解 | #登录验证#
登录验证
https://www.nowcoder.com/practice/799daf76369c4fb1a2e2d56f885225ae
#include <stdio.h> #include <string.h> int main() { char account[20]; char password[20]; while (scanf("%s %s", account, password) != EOF) { if (strcmp(account,"admin") == 0 &&strcmp(account,password) == 0) { printf("Login Success!"); } else { printf("Login Fail!"); } } return 0; }