Advertisement
vvsvvs

Untitled

May 18th, 2022
446
142 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2.  
  3. namespace ConsoleApp9
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             int[,] matrix = new int[4, 4];
  10.  
  11.             for (int i = 0; i < matrix.GetLength(0); i++)
  12.             {
  13.                 for (int j = 0; j < matrix.GetLength(1); j++)
  14.                 {
  15.                     matrix[i, j] = i + j;
  16.                 }
  17.             }
  18.  
  19.             Console.WriteLine(string.Join(' ', matrix));
  20.         }
  21.     }
  22. }
  23.  
Advertisement
RAW Paste Data Copied
Advertisement