安全问答

安全问答是一个知识全球问答,包含丰富的问答知识

首页 常规 游戏 娱乐 科技 程序员

C++ 字符串大小写转换:将所有小写字母转换为大写字母

  • 日期: 2028-11-15
  • 标签: 常规

#include \n#include \n#include \n\nint main() {\n std::string str; \n std::getline(std::cin, str); \n \n for (char& c : str) { \n if (std::islower(c)) { \n c = std::toupper(c); \n } \n } \n \n std::cout << str << std::endl; \n \n return 0; \n}

C++ 字符串大小写转换:将所有小写字母转换为大写字母

原文地址: https://www.cveoy.top/t/topic/nTHU 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录

  • 上一篇: Selenium自动化测试工具:原理、应用和优势
  • 下一篇: 银行绿色金融产品类型及市场分析:政策、公司和数据

© 2019 • 2025 - 安全问答 站长邮箱:wxgpt@qq.com    ICP备案/许可证号:豫ICP备2024104334号-2