C++输出爱心符号
时间: 2023-07-01 22:18:54 浏览: 142
可以使用以下代码在C++中输出爱心符号:
```cpp
#include <iostream>
using namespace std;
int main()
{
cout << " ♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥" << endl;
cout << " ♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥" << endl;
cout << "♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥" << endl;
cout << "♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥" << endl;
cout << "♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥" << endl;
cout << " ♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥" << endl;
cout << " ♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥" << endl;
cout << " ♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥" << endl;
cout << " ♥♥♥♥♥♥♥♥♥♥♥♥" << endl;
cout << " ♥♥♥♥♥♥♥♥" << endl;
cout << " ♥♥♥♥" << endl;
cout << " ♥" << endl;
return 0;
}
```
输出结果如下:
```
♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥
♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥
♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥
♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥
♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥
♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥
♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥
♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥
♥♥♥♥♥♥♥♥♥♥♥♥
♥♥♥♥♥♥♥♥
♥♥♥♥
♥
```
阅读全文