using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication30 { class Program { static void VyvodA(int[] A, int n) { for (int j = 0; j < n; j++) Console.Write(A[j] + "\t"); } static void VyvodB(int[] B, int m) { for (int j = 0; j < m; j++) Console.Write(B[j] + "\t"); } static void Main(string[] args) { Console.WriteLine("Введите кол-во элементов 1-го массива: "); int n = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("Введите кол-во элементов 2-го массива: "); int m = Convert.ToInt32(Console.ReadLine()); int[] A = new int[n]; int[] B = new int[m]; int sA = 0; int sB = 0; int pA = 1; int pB = 1; for (int i = 0; i < n; i++) { Console.Write("A" + "[" + i + "]="); A[i] = Convert.ToInt32(Console.ReadLine()); sA = sA + A[i]; pA = pA * A[i]; } Console.WriteLine(); for (int i = 0; i < m; i++) { Console.Write("B" + "[" + i + "]="); B[i] = Convert.ToInt32(Console.ReadLine()); sB = sB + B[i]; pB = pB * B[i]; } Console.WriteLine("Исходный массивы: "); Console.WriteLine("массив А: "); VyvodA(A, n); Console.WriteLine("сумма элементов= " + sA + "; произведение элементов= " + pA); Console.WriteLine(); Console.WriteLine("массив B: "); VyvodA(B, m); Console.WriteLine("сумма элементов= " + sB + "; произведение элементов= " + pB); Console.ReadKey(); } } }