Created
June 2, 2016 14:14
-
-
Save Nikola-Andreev/c8f701c6205fb07e528c84718faec0de to your computer and use it in GitHub Desktop.
2.Matrix of Palindromes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
List<int> input = Console.ReadLine().Split(' ').Select(int.Parse).ToList(); | |
char[,] matrix = new char[input[0], input[1]]; | |
char a = 'a'; | |
char b = 'a'; | |
for (int rows = 0; rows < input[0]; rows++) | |
{ | |
for (int cols = 0; cols < input[1]; cols++) | |
{ | |
Console.Write(a); | |
Console.Write(b); | |
Console.Write(a); | |
Console.Write(" "); | |
b++; | |
} | |
Console.WriteLine(); | |
a++; | |
b = a; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment