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 FifthProject
- {
- class Program
- {
- static void Main(string[] args)
- {
- int sum1 = 0;
- int sum2 = 1;
- int[,] array =
- {
- {4,5,7},
- {2,2,6},
- {1,3,3}
- };
- 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();
- }
- for (int i = 0; i < array.GetLength(1); i++)
- {
- sum1 += array[1, i];
- }
- for (int i = 0; i < array.GetLength(1); i++)
- {
- sum2 *= array[i, 0];
- }
- Console.WriteLine(sum1);
- Console.WriteLine(sum2);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement