#include <stdio.h> #include <string.h> int main() { char username[21]; // 存储账号的字符数组 char password[21]; // 存储密码的字符数组 // 提示用户输入账号和密码 scanf("%s %s", username, password); // 检查账号和密码是否与预设值一致 if (strcmp(username, "dotcpp") == 0 && strcmp(password, "123456") == 0) { printf("Login Successfull!\n"); // 登陆成功提示 } else { printf("Login Fails!\n"); // 登陆失败提示 } return 0; }
0.0分
0 人评分