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 _2_Сshrp_L
- {
- class Program
- {
- static void Main(string[] args)
- {
- int col = 0;
- int line = 1;
- int[,] array = {
- { 6, 2, 89, 4, 3, 9 },
- { 5, 5, 3, 2, 6, 2 },
- { 6, 6, 9, 1, 4, 2 } };
- 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();
- }
- int sum = 0, multi = 1;
- for (int i = 0; i < array.GetLength(0); i++)
- {
- multi*= array[i, col];
- }
- for (int i = 0; i < array.GetLength(1); i++)
- {
- sum += array[line, i];
- }
- Console.WriteLine("Произведение 1ого столбца : " + multi);
- Console.WriteLine("Сумма 2й строки : " + sum);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement