C++表白代码,输入你和你对象的名字立刻生成变色动态桃心图案。

#include
#include

using namespace std;
int main()
{

char str1[520] = " 我 爱 你";

for (int i = 0; i < strlen(str1); i++)
{
if (str1[i] == '#') {
putchar('\n');
continue;
}
putchar(str1[i]);
int Sleep(120);

} float x, y;
string s = "XX love XX";
int l = s.length();
for (y = 1.3f; y >= -1.1f; y -= 0.06f)
{
int t = 0;
for (x = -1.1f; x <= 1.1f; x += 0.025f)
{
double heart = x * x + (5.0 * y / 4.0 - sqrt(abs(x))) * (5.0 * y / 4.0 - sqrt(abs(x)));
if (heart <= 1) {
cout << s[t];
t = (t + 1) % l;
}
else cout << " ";
}
cout << endl;
}


#include
#include
#include
#define I 20
#define R 340

int i, j, e;
int a;
long time;




for (;;)

{
system("color a");

for (time = 0; time < 99999999; time++);

system("color 5");

for (time = 0; time < 99999999; time++);

system("color c");

for (time = 0; time < 99999999; time++);

system("color d");

for (time = 0; time < 99999999; time++);

system("color e");

for (time = 0; time < 99999999; time++);

system("color c");

for (time = 0; time < 99999999; time++);

system("color 0");

for (time = 0; time < 99999999; time++);

system("color 6");

for (time = 0; time < 99999999; time++);

system("color 4");

for (time = 0; time < 99999999; time++);

system("color 3");

for (time = 0; time < 99999999; time++);

system("color 4");

for (time = 0; time < 99999999; time++);

system("color 5");

for (time = 0; time < 99999999; time++);

system("color 6");

for (time = 0; time < 99999999; time++);

system("color 9");

for (time = 0; time < 99999999; time++);

system("color 8");

for (time = 0; time < 99999999; time++);

system("color 9");

}
return 0;
}

你可能感兴趣的:(c++)