各位,看到标题大家肯定会联想许多,到底怎样算最美的代码?先不多说,代码先上:
#include<stdio.h>
#include <graphics.h>
#include <math.h>
#include <conio.h>
#define PI 3.1415926
//绘制心形线的函数
void cardioid(int x, int y, int a)
//x: x方向上的偏移量
//y: y方向上的偏移量
//a: 缩放倍数
{
int x1, y1, x2, y2;
double angle = 0;
while (angle