|
@@ -1,6 +1,6 @@
|
|
|
using System;
|
|
|
|
|
|
-namespace MyApp // Note: actual namespace depends on the project name.
|
|
|
+namespace ConsoleApp1// Note: actual namespace depends on the project name.
|
|
|
{
|
|
|
internal class Program
|
|
|
{
|
|
@@ -30,8 +30,40 @@ namespace MyApp // Note: actual namespace depends on the project name.
|
|
|
}
|
|
|
Console.WriteLine();
|
|
|
}
|
|
|
+ //Первый массив
|
|
|
+ Console.WriteLine(" ");
|
|
|
+ int v = n;
|
|
|
+ int[] M = new int[v];
|
|
|
+ for (int i = 0; i < v; i++)
|
|
|
+ {
|
|
|
+ Console.WriteLine("Введите " + '[' + i + ']' + " элемент: ");
|
|
|
+ M[i] = Convert.ToInt32(Console.ReadLine());
|
|
|
+ sum1 = sum1 + M[i];
|
|
|
+ }
|
|
|
+ Console.WriteLine("");
|
|
|
+ for (int i = 0; i < v; i++)
|
|
|
+ {
|
|
|
+ Console.Write("{0} ", M[i]);
|
|
|
+ }
|
|
|
|
|
|
+ //Второй массив
|
|
|
+ Console.WriteLine("\n");
|
|
|
+ int x = m;
|
|
|
+ int[] N = new int[x];
|
|
|
+ for (int i = 0; i < x; i++)
|
|
|
+ {
|
|
|
+ Console.WriteLine("Введите " + '[' + i + ']' + " элемент: ");
|
|
|
+ N[i] = Convert.ToInt32(Console.ReadLine());
|
|
|
+ sum2 = sum2 + N[i];
|
|
|
+ }
|
|
|
+ Console.WriteLine(" ");
|
|
|
+ for (int i = 0; i < x; i++)
|
|
|
+ {
|
|
|
+ Console.Write("{0} ", N[i]);
|
|
|
+ }
|
|
|
+ Console.WriteLine("");
|
|
|
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
}
|