#include<stdio.h>
#include<conio.h>
#include<windows.h>
#include<time.h>
#include<math.h>
#define U 0.078
#define V 0.036
HANDLE handle;
void gotoxy(int x,int y);//将光标移动至坐标为(x,y)的位置
void projectInit();//初始化
int main()
{
projectInit();
printf("请双击标题栏放大窗口:按任意键继续\n");
getch();
gotoxy(0,0);
float x, y;
for ( y=2; y>=-2; y-=U ){
for ( x=-1.2; x<=1.2; x+=V){
if ( ( ( (x*x + y*y - 1)*(x*x + y*y - 1)*(x*x + y*y - 1) - x*x*y*y*y ) <= 0 ) ){
printf("%c",3);
}
else
if(y<1.28 && y>-1.0) printf(" ");
}
if(y<1.28 && y>-1.0)printf("\n");
}
getchar();
return 0;
}
void projectInit()//初始化
{
CONSOLE_CURSOR_INFO cursorInfo;
handle = GetStdHandle(STD_OUTPUT_HANDLE);//获得该窗口句柄
GetConsoleCursorInfo(handle,&cursorInfo);
cursorInfo.bVisible = false;//隐藏光标
SetConsoleCursorInfo(handle,&cursorInfo);
SetConsoleOutputCP(936);
}
void gotoxy(int x,int y) //移动坐标
{
COORD coord;
coord.X=x;
coord.Y=y;
SetConsoleCursorPosition( GetStdHandle( STD_OUTPUT_HANDLE ), coord );
}
#include<conio.h>
#include<windows.h>
#include<time.h>
#include<math.h>
#define U 0.078
#define V 0.036
HANDLE handle;
void gotoxy(int x,int y);//将光标移动至坐标为(x,y)的位置
void projectInit();//初始化
int main()
{
projectInit();
printf("请双击标题栏放大窗口:按任意键继续\n");
getch();
gotoxy(0,0);
float x, y;
for ( y=2; y>=-2; y-=U ){
for ( x=-1.2; x<=1.2; x+=V){
if ( ( ( (x*x + y*y - 1)*(x*x + y*y - 1)*(x*x + y*y - 1) - x*x*y*y*y ) <= 0 ) ){
printf("%c",3);
}
else
if(y<1.28 && y>-1.0) printf(" ");
}
if(y<1.28 && y>-1.0)printf("\n");
}
getchar();
return 0;
}
void projectInit()//初始化
{
CONSOLE_CURSOR_INFO cursorInfo;
handle = GetStdHandle(STD_OUTPUT_HANDLE);//获得该窗口句柄
GetConsoleCursorInfo(handle,&cursorInfo);
cursorInfo.bVisible = false;//隐藏光标
SetConsoleCursorInfo(handle,&cursorInfo);
SetConsoleOutputCP(936);
}
void gotoxy(int x,int y) //移动坐标
{
COORD coord;
coord.X=x;
coord.Y=y;
SetConsoleCursorPosition( GetStdHandle( STD_OUTPUT_HANDLE ), coord );
}