Advertisement
Stanislav2812

Untitled

Aug 21st, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.71 KB | None | 0 0
  1. using System;
  2. using System.Threading;
  3. using System.Collections;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8.  
  9.  
  10. namespace MyFirstProgram
  11. {
  12.     class Program
  13.     {
  14.  
  15.         static void Main(string[] args)
  16.         {
  17.             int[,] array = { { 1, 3, 5, 7 },{ 2, 4, 6, 8 } };
  18.            
  19.            
  20.             PrintArray(array);
  21.         }
  22.            
  23.            
  24.         static void PrintArray(int[,] array)
  25.         {
  26.             for(int i = 0; i < array.GetLength(0); i++ )
  27.             {
  28.                 for (int j = 0; j < array.GetLength(1); j++)
  29.                     Console.Write(array[i,j]);
  30.                
  31.             }
  32.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement