using System;
public class Program
{
public static void Main()
int[] arr = { -2, 5, 3, -7, 1 };
int lastNegative = -1;
for (int i = 0; i<arr.Length; i++)
if (arr[i] < 0)
lastNegative =arr[i];
}
if (lastNegative < 0)
Console.WriteLine("Останній від'ємник елемент: " + lastNegative );
else
Console.WriteLine("В масиві немає від'ємних елементів");