alex_bn_lee

导航

【001】学习计划 - 开始学习C#,用C#

1. 学习C#。

2. 软考的证书。

3. 英语听力。

--------------------------------------------------------------------------------------------------------------------------

开始学习C#,用C#

View Code
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Ch04Ex06
{
class Program
{
static void Main(string[] args)
{
double x, y;

for (x = -50; x <= 50; x+=2)
{
for (y = -50; y <= 50; y+=2)
{
if ((x * x + y * y) > 500 || (x * x + y * y) < 400)
{
if (x == 0 || y == 0)
Console.Write("");
else
{
Console.Write("");
}

}
else
Console.Write("");
}
Console.WriteLine();
}
Console.ReadKey();


}
}
}

运行效果:将x轴和y轴以及一个圆的边界描绘出来~

posted on 2011-11-16 22:01  McDelfino  阅读(648)  评论(1编辑  收藏  举报