using System;
using System.Collections.Generic;
using System.Text;

namespace ConsoleApplication3
{
    class Program
    {
        static void Main(string[] args)
        {
            double realcoord, imagcoord;
            double realtemp, imagtemp, realtemp2, arg;
            int iterations;
            for (imagcoord = 1.2; imagcoord >= -1.2; imagcoord -= 0.05)
            {
                for (realcoord = -0.6; realcoord <= 1.77; realcoord += 0.03)
                {
                    iterations = 0;
                    realtemp = realcoord;
                    imagtemp = imagcoord;
                    arg = (realcoord * realcoord) + (imagcoord * imagcoord);
                    while ((arg < 4) && (iterations < 40))
                    {
                        realtemp2 = (realtemp * realtemp) - (imagtemp * imagtemp) - realcoord;
                        imagtemp = (2 * realtemp * imagtemp) - imagcoord;
                        realtemp = realtemp2;
                        arg = (imagtemp * imagtemp) + (realtemp * realtemp);
                        iterations += 1;
                    }
                    switch (iterations % 4)
                    {
                        case 0:
                            Console.Write(".");
                            break;
                        case 1:
                            Console.Write("o");
                            break;
                        case 2:
                            Console.Write("O");
                            break;
                        case 3:
                            Console.Write("@");
                            break;
                    }
                }
                Console.Write("\n");
            }
            Console.ReadKey();

}
    }
}

最新文章

  1. css使absolute相对于父容器进行定位而不是以body(为什么绝对定位(absolute)的父级元素必须是相对定位(relative))
  2. linux_shell_4_shell特性
  3. minix2.0内核组织结构与公用头文件说明
  4. ThinkPHP3.2对接开发支付宝即时到帐接口
  5. MMS关键指标意义&amp;各数值区间意义
  6. Hibernate学习笔记整理系列-------一、Hibernate简介
  7. 分层图+最短路算法 BZOJ 2763: [JLOI2011]飞行路线
  8. Mysql 5.7.7
  9. Hardwood Species(水)
  10. windows同时安装两个jdk
  11. 【HDOJ】2451 Simple Addition Expression
  12. [置顶] java得到前一个月的年月日时分秒
  13. java操作redis之按照关键字删除缓存数据
  14. Java集合框架入门介绍(一)
  15. BZOJ5074 小B的数字 BZOJ2017年10月月赛 其他
  16. delphi inttohex 整型到十六进制
  17. 判断Service是否已经启动
  18. Bootstrap 代码
  19. shell篇(一)
  20. Cortex-A

热门文章

  1. Thinkpad 拆光驱更换光驱硬盘支架、拆光驱面板 T400 T440
  2. Spring入门第十一课
  3. AngularJS 2.0 学习
  4. Swoole 协程 MySQL 客户端与异步回调 MySQL 客户端的对比
  5. c# sleep 例子-线程挂起
  6. ajax连接服务器框架
  7. java基础第八篇之jdk1.5、jdk1.7、jdk1.8新特性
  8. Composer的简单使用
  9. 黑马旅游网配置 pom.xml
  10. xml布局文件