using System; using System.Collections.Generic; using System.Linq; namespace Prog { class Program { static void Main(string[] args) { List array = new List() { 7, 25, 4.5, 0, 17, 61, -10, 0, 1, -4, 22 }; // TASK 5 int positive, negative, zero; var tmp = array.FindAll(x => x > 0); positive = tmp.Count; tmp = array.FindAll(x => x == 0); zero = tmp.Count; negative = array.Count - zero - positive; Console.WriteLine($"Кол-во полож. элементов: {positive}\n\rКол-во нулевых элементов: {zero}\n\rКол-во отриц. элементов: {negative}"); // TASK 6 double prv = 1; for (int i = 0; i < array.Count; ++i) { if (array[i] != 0) { prv *= array[i]; } } Console.WriteLine($"Произведение ненулевых элементов равно: {prv}"); Console.ReadKey(); } } }