酷代码 AI
菜单
服务商

输入一个字符串s,判断其中是否有'0'。若有'0'则输出"yes",否则输出"no"。 输入: 一个字符串s。 输出: 若字符串s中有'0'则输出"yes",否则输出"no"。 输入样例: 1: 20200125 输出样例: 1: yesC++17 回答篇幅:简单明了

```cpp #include <iostream> #include <string> using namespace std; int main() { string s; cin >> s; if (s.find('0') != string::npos) { cout << "yes"; } else { cout << "no"; } return 0; } ``` [2026-02-08 14:23:08 | AI问答 | 81点数解答]

相关提问
发财导航,免费问AI
实用工具查看更多