蓝桥0815-3个字符比较输出
#include <cstdio> #include <cstring> #include <iostream> #include <stdio.h> using namespace std; int main() { //字符判断 char a[5]; cin.getline(a,4); if(a[0] == a[1] && a[1] != a[2] || a[0] == a[2] && a[1] != a[2] || a[1] == a[2] && a[0] != a[2] ) { printf("%s","Yes"); } else { printf("%s","No"); } return 0; }