字符心形

在这里插入图片描述

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
    
    
    float y,x,a;
    for(y=1.5f;y>-1.5f;y-=0.1f)
    {
    
    
        for(x=-1.5f;x<1.5f;x+=0.05f)
        {
    
    
	        a=x*x+y*y-1;
	        putchar(a*a*a-x*x*y*y*y<=0.0f?'*': ' ');
        }
        putchar('\n');
    }
}

猜你喜欢

转载自blog.csdn.net/qq_43341057/article/details/104727454
今日推荐