using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication30 { class Program { static void Vyvod(int[] A) { int k=0; for (int j = 0; j < n; j++) { Console.Write(A[j] + "\t"); if (A[j] != 0) { k++; } } Console.WriteLine(); Console.WriteLine("Количество ненулевых элементов= "+k); } const int n = 10; static void Main(string[] args) { int[]A=new int[n]; for (int i = 0; i < n; i++) { Console.Write("A" + "[" + i + "]="); A[i] = Convert.ToInt32(Console.ReadLine()); } Vyvod(A); Console.ReadKey(); } } }