爱心

#include <stdio.h>
#include <stdlib.h>
#include <windows.h>


int main()
{
float x,y,a;
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?'*':' ');
}
system("color 02");
putchar('\n');
}


return 0;
}

posted @ 2022-09-28 17:39  山川曜星空  阅读(71)  评论(0)    收藏  举报