// ConsoleApplication1.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。
//
#include
using namespace std;
int main()
{
system("color f5");
int i, j;
cout << " 我我我我我我我 爱爱爱爱爱爱爱" << endl;
cout << " 你你你你你你你你您你 郭郭郭郭郭郭郭郭郭郭" << endl;
cout << " 艳艳艳艳艳艳艳艳艳艳艳艳 你你你你你你你你你你你你" << endl;
for (i = 0; i < 3; i++)
{
for (j = 0; j < 26; j++)
cout << "爱";
cout << endl;
}
for(i = 0; i < 7; i++)
{
for (j = 0; j < 4* (i + 1) - 1; j++)
cout << " ";
for(j = 0; j < 22 - i * 4; j++)
cout <<"我";
cout << endl;
}
for (i = 0; i < 0.1; i++)
{
cout << " 吗";
cout << endl;
cout << endl;
}
cout << " 爱你一身一世!!!";
cout << endl;
cout << endl;
cout << endl;
system("pause");
return 0;
} for (j = 0; j < 4* (i + 1) - 1; j++)有人知道里面j<4*(i+1)没看明天不知啥意思
这个是为了控制每行的空格数量,控制字符我 之前的空格应该输出多少次
它是每行比上一行多四个,所以4*(i+1),形成心形的视觉效果