Advertisement
PRO100LY4UK

3.3

Aug 19th, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.92 KB | None | 0 0
  1. using System;
  2.  
  3. namespace CSLight11
  4. {
  5.     internal class Program
  6.     {
  7.         private static void Main(string[] args)
  8.         {
  9.             int[,] array = {
  10.                 {1,2,3},
  11.                 {4,5,6},
  12.                 {7,8,9},
  13.                             };
  14.  
  15.             for (int i = 0; i < array.GetLength(0); i++)
  16.             {
  17.                 for (int j = 0; j < array.GetLength(1); j++)
  18.                 {
  19.                     Console.Write(array[i, j] + " ");
  20.  
  21.                 }
  22.                 Console.WriteLine();
  23.             }
  24.             while (true)
  25.             {
  26.                 Console.WriteLine("Сумма второй строки = " + (array[1, 0] + array[1, 1] + array[1, 2]));
  27.                 Console.WriteLine("Произведение первого столбца = " + (array[0, 1] * array[1, 1] * array[2, 1]));
  28.                 break;
  29.             }
  30.            
  31.         }
  32.     }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement