用C++给你朋友画个爱心

root 站长 2022-11-02 18:08:00 4
#include <bits/stdc++.h>

using namespace std;

int main()
{
	double a;
	for (double y = 1.5; y > -1.5; y -= 0.1)
	{
		for (double 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 0c");
		putchar('\n');		
	}
	printf("你朋友的名字~\n");
	printf("永远开心快乐!( ̄▽ ̄) ~*( ̄▽ ̄)/\n");
	
	return 0;
}
{{ vote && vote.total.up }}

共 12 条回复

tctm16
tctm119