#include <stdio.h> #include <string.h> int main() { char password1[20] = { 0 }; char password2[20] = { 0 }; //输入 scanf("%s %s", password1, password2); //判断 if (strcmp(password1, password2)) { printf("different\n"); } else { printf("same\n"); } return 0; }