过生日就来一个赛博爱心和蛋糕吧哈哈
代码可复制 大家可直接ctrl+c啦 制作不易,求求大家点个赞啦
#define CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include<stdlib.h>
#include<Windows.h>
int main(int argc, char* argv[])
{
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 e");
putchar('\n');
}
printf("\t\t 1 8\n\n");
printf("\t * \n");
printf("\t | \n");
printf("\t * ooooooooooo * \n");
printf("\t | | | | \n");
printf("\t oooooooooooooooooooooooooooooo\n");
printf("\t | 生 日 快 乐 |\n");
printf("\t |____________________________|\n\n");
printf("\n\t HAPPY BIRTHDAY! \n\n");
printf("\t\t 祝我\n\n");
printf("\t\t 生日快乐,天天开心\n\n\n");
return 0;
}``
运行效果:
