麻烦大神帮我看下我这个C++代码哪里有错?#include #include using namespace std;int main() {string str;string one;cout str;if (str == cout
来源:学生作业帮助网 编辑:作业帮 时间:2024/09/08 10:12:38
![麻烦大神帮我看下我这个C++代码哪里有错?#include #include using namespace std;int main() {string str;string one;cout str;if (str == cout](/uploads/image/z/14837407-7-7.jpg?t=%E9%BA%BB%E7%83%A6%E5%A4%A7%E7%A5%9E%E5%B8%AE%E6%88%91%E7%9C%8B%E4%B8%8B%E6%88%91%E8%BF%99%E4%B8%AAC%2B%2B%E4%BB%A3%E7%A0%81%E5%93%AA%E9%87%8C%E6%9C%89%E9%94%99%3F%23include+%23include+using+namespace+std%3Bint+main%28%29+%7Bstring+str%3Bstring+one%3Bcout+str%3Bif+%28str+%3D%3D+cout)
麻烦大神帮我看下我这个C++代码哪里有错?#include #include using namespace std;int main() {string str;string one;cout str;if (str == cout
麻烦大神帮我看下我这个C++代码哪里有错?
#include
#include
using namespace std;
int main()
{
string str;
string one;
cout str;
if (str ==
cout
麻烦大神帮我看下我这个C++代码哪里有错?#include #include using namespace std;int main() {string str;string one;cout str;if (str == cout
语法上少了一对括号,你看一下
#include <iostream>
#include <string>
using namespace std;
int main()
{
string str;
string one;
cout << "请输入你好:" << endl;
cin >> str;
if (str == "你好")
{ //少一对括号
cout << "进入二度模式" << endl;
cout << "请选择:" << endl;
cin >> one;
if (one == "进入")
{
cout<<"yes"<<endl;
}
else if (one == "不进入")
{
cout<<"NO"<< endl;
}
else
{
cout<<"错误请重新输入"<<endl;
}
} //少一对括号
else if (str == "a")
exit(0);
else
cout<<"错误请重新输入"<<endl;
system("pause");
return 0;
}