You are on page 1of 1

using System;

namespace brainly_4703350
{
class Program
{
static void Main(string[] args)
{

int n = int.Parse(Console.ReadLine());

int[,] a= new int[n, n];

for (int i = 0; i < n; i++)


{
for (int j = 0; j < n; j++)
{
if (i == j)
a[i, j] = 0;
else
a[i, j] = n-j;
}
}

for (int i = 0; i < n; i++)


{
for (int j = 0; j < n; j++)
{
Console.Write(a[i,j] + " ");
}
Console.WriteLine();
}
}
}
}

You might also like