Console.WriteLine("Введите размер матрицы:");
int n = Convert.ToInt32(Console.ReadLine());
int[,] a = new int[n, n];
Console.WriteLine("Введите элементы матрицы:");
for (int i = 0; i < n; i++)
{
for (int j = 0; j < n; j++)
{
a[i, j] = Convert.ToInt32(Console.ReadLine());
}
}
bool negative = false;
for (int i = 0; i < n; i++)
{
for (int j = 0; j <= i; j++)
{
if (a[i, j] < 0)
{
negative = true;
break;
}
}
if (negative)
break;
}
if (negative)
Console.WriteLine("Есть отрицательные");
else
Console.WriteLine("Нет отрицательных");
Console.ReadKey();