Advertisement
EVAEVA

Untitled

Jan 28th, 2017
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.78 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ConsoleApplication8
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             int currentPosition = 0;
  14.             string message = "привет привет привет";
  15.             string [,] array = new string[5,5];
  16.             for (int i = 0; i < 5; i++)
  17.             {
  18.                 for (int j = 0; j < 5; j++)
  19.                 {
  20.                     array[j, i] = message.Substring(currentPosition, 1);
  21.                     Console.Write(array[j, i]);
  22.                     currentPosition++;
  23.                 }
  24.                 Console.WriteLine();
  25.             }
  26.             Console.Read();
  27.         }
  28.     }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement