Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Study
- {
- class Program
- {
- static void Main(string[] args)
- {
- int[,] array = { { 0, 1, 2, }, { 3, 4, 5 }, { 6, 7, 8 } };
- int SumOfTheSecondLine = array[1, 0] + array[1, 1] + array[1, 2];
- int ProductOfTheFirstColumn = array[0, 0] * array[1, 0] * array[2, 0];
- Console.WriteLine("Исходная матрица");
- for (int i = 0; i < array.GetLength(0); i++)
- {
- for (int j = 0; j < array.GetLength(1); j++)
- {
- Console.Write(array[i, j] + " ");
- }
- }
- Console.WriteLine("Сумма второй строки");
- Console.WriteLine(SumOfTheSecondLine);
- Console.WriteLine("Произведение первого столбца");
- Console.WriteLine(ProductOfTheFirstColumn);
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement