Professional Documents
Culture Documents
Namespace Class Static Void String Int Int New Int Int: Program
Namespace Class Static Void String Int Int New Int Int: Program
Namespace Class Static Void String Int Int New Int Int: Program
{
class Program
{
static void Main(string[] args)
{
int i, v, n, f, x, y, z;
z = i = 1;
f = n;
v = n * n;
while (z < v)
{
for (x = i; x <= f - 1; x++)
{
espiral[x, f] = z;
z++;
}
f--;
i++;
Console.WriteLine("--------------------------");
{
Console.Write("|");
for (y = 1; y <= n; y++)
{
Console.Write("\t {0}", espiral[x, y]);
}
Console.WriteLine("\t|");
}
Console.ReadKey();
}
}
}