using System; namespace Test { class Program { static void Main() { Random random = new Random(); int n, counter = 0; int[] a, temp; Console.Write("Введите n: "); n = int.Parse(Console.ReadLine()); a = new int[n]; temp = new int[n]; for(int i = 0; i < n; i++) { a[i] = random.Next(-10, 60 + 1); Console.Write(a[i] + " "); } Console.WriteLine(); for(int i = 0; i < n; i++) { if(a[i] % 3 != 0 || a[i] % 10 % 2 == 0) { temp[counter++] = a[i]; } } Array.Resize(ref temp, counter); for(int i = 0; i < counter; i++) { Console.Write(temp[i] + " "); } Console.WriteLine(); Console.ReadKey(); } } }