中国石油大学北京吧 关注:53,464贴子:853,386
  • 9回复贴,共1
#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 );
}


来自Android客户端1楼2015-05-21 19:30回复


    IP属地:湖北来自Android客户端2楼2015-05-21 19:32
    回复
      牛逼逼


      来自Android客户端3楼2015-05-21 19:43
      回复
        . ▼ 只♡
         ▼ 想♡
          ▼ 为♡
           ▼ 楼♡
            ▼ 主♡
             ▼ 留♡
              ▼ 一♡
        ♡—————————次——►
              ▲ 霸♡
             ▲ 气♡
            ▲ 的♡
           ▲ 十♡
          ▲ 五♡
         ▲ 字♡
        I


        来自Android客户端4楼2015-05-21 20:15
        回复
          小伙子


          5楼2015-05-21 20:38
          回复
            然而我上学期已经学完了


            IP属地:广西来自Android客户端6楼2015-05-21 20:57
            回复


              IP属地:浙江来自Android客户端7楼2015-05-21 21:12
              回复
                技术贴没人


                来自Android客户端8楼2015-05-22 20:07
                回复
                  看不懂
                  来自尊贵酷炫的wp第三方客户端


                  来自WindowsPhone客户端9楼2015-05-22 23:22
                  回复
                    去机房试试就知道了


                    来自Android客户端10楼2015-05-23 12:27
                    回复