0
已采纳
@陈喆鹏
思路如下:
1:直接输出即可
第一种如下
cout<<"Hello,World"<<endl;
2:把这个转化成字符串输出即可
第二种如下
string a="Hello, World!";
cout<<a;
注意:使用第二种时,需要头文件
#include <cstring>
两种都还需要注意标点和大写,别忘了最后的感叹号
祝你天天向上
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
一共有两种方法:
第一种方法:直接输出。
cout<<"Hello, World!";
第二种方法:字符串存储,在输出。
string s1="Hello, World!";
cout<<s1;
第二种方法要头文件:#include <string>
0
0
0
0
0