代码:
#include<stdio.h>
#include <windows.h>
#include<tchar.h>
int main()
{
system("color 2");//这里修改颜色码
double x,y,a;
for(y=1.5;y>-1.5;y-=0.1214)
{
for(x=-1.5;x<1.5;x+=0.05)
{
a=x*x+y*y-1;
if(a*a*a-x*x*y*y*y<=0)
{
printf("*");
Sleep(1);
}
else
printf(" ");
}
printf("\n");
}
return 0;
}
C语言颜色参考
字体颜色
0 = 黑色 8 = 灰色
1 = 蓝色 9 = 淡蓝色
2 = 绿色 A = 淡绿色
3 = 湖蓝色 B = 淡浅绿色
4 = 红色 C = 淡红色
5 = 紫色 D = 淡紫色
6 = 黄色 E = 淡黄色
7 = 白色 F = 亮白色
背景颜色40-47之间