您的位置 首页 技术

用c语言编写爱心的代码是什么?

用c语言编写爱心的代码是什么? 用c语言编写爱心的代码是 #include <stdio.h>#include <math.h>#include <s…

用c语言编写爱心的代码是什么?

用c语言编写爱心的代码是

#include <stdio.h>#include <math.h>#include <stdio.h>int main(){    float y, x, z, f;    for (y = 1.5f; y > -1.5f; y-=0.1f)    {        for (x = -1.5f; x < 1.5f; x += 0.05f)        {            z = x*x + y*y -1;            f = z*z*z - x*x*y*y*y;            putchar(f <= 0.0f ? "*********"[(int)(f*-8.0f)]:' ');        }        putchar('\n');    }    getchar();    return 0;}

9af974c83df96284dce004e7bebba6f.png

推荐教程:《C视频教程》

以上就是用c语言编写爱心的代码是什么?的详细内容,更多请关注24课堂在线网其它相关文章!

本文来自网络,不代表24小时课堂在线立场,转载请注明出处:https://www.24ketang.cn/82954.html

为您推荐

返回顶部