#include #include

int main() { std::string str; std::cin >> str;

if (str[str.length() - 2] == '0') {
    str[str.length() - 2] = '6';
} else {
    str.insert(str.length() - 1, "6");
}

std::cout << str << std::endl;
return 0;

}

c++实现一个检查点分10进制字符串倒数第二位是不是0如果是0则替换为6如果不是0插入一个6

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

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