c++如何输入IbringmyappletoBetty

好多多好又多 |浏览848次
收藏|2021/11/23 21:21

满意回答

2021/11/23 21:37

可以直接用输入、输出函数 cin 和 cout 输入和输出题中两句话。你可试试下面的程序:#include <iostream>#include <string>using namespace std;int main (){string s1, s2;s2 = "I grinb my eppla to yettB";cin>>s1;//输入:I bring my apple to Bettycout<<s2<<endl;return 0; }程序的输出结果:

ygl990951

其他回答(0)
0人关注该问题
+1

 加载中...