using System.Collections.Generic;
namespace ConsoleApplication1
Console.WriteLine("Начать сначала");
public static void Main(string[] args)
Console.WriteLine("Введите размерность массива:");
int a = Convert.ToInt32(Console.ReadLine());
int [,] A = new int[a, a];
for (int k = 1; k <= p; k++)
for (int j = k - 1; j < a - k + 1; j++)
for (int j = k; j < a - k + 1; j++)
for (int j = a - k - 1; j >= k - 1; --j)
for (int j = a - k - 1; j >= k; j--)
Console.WriteLine("Полученный массив:");
for (int w = 0; w < a; w++)
for (int j = 0; j < a; j++)
Console.Write(A[w, j]+"\t") ;
Console.WriteLine("Продолжить? да/нет");
String otvet = Console.ReadLine();
if (otvet == "да") newPR();
if (otvet == "нет") endPR();
Console.WriteLine("Завершение работы");