表白代码

CPP
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include<iostream>
#include<stdio.h>
#include<windows.h>
using namespace std;
int main()
{
int b=1;
float x,y,a;
system("color 5c");
while(b<=5) //这里选择次数
{
for(y=1.5;y>-1.5;y-=0.1)
{
for(x=-1.5;x<1.5;x+=0.05)
{
a=x*x+y*y-1;
putchar(a*a*a-x*x*y*y*y<=0.0?'*':' ');
}
putchar('\n');
}
Sleep(1000);
b++;
}
Sleep(1000);
cout<<"我";
Sleep(1000);
cout<<"喜";
Sleep(1000);
cout<<"欢";
Sleep(1000);
cout<<"你"<<endl;
Sleep(2000); //这里选择等待毫秒数
system("pause");
return 0;
}