警示后人
查看原帖
警示后人
522885
童年的小翼龙楼主2024/1/20 10:14

人名大小写不敏感。

对于 C++,你可以在读入后立刻像这样处理人名:

auto howInterestingData = [&](string &st) {
  for (auto &i : st) {
    if ('A' <= i and i <= 'Z') {
      i += 'a' - 'A';
    }
  }
};
string name;
cin >> name;
howInterestingData(name);
2024/1/20 10:14
加载中...