Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Nikola-Andreev/c8f701c6205fb07e528c84718faec0de to your computer and use it in GitHub Desktop.
Save Nikola-Andreev/c8f701c6205fb07e528c84718faec0de to your computer and use it in GitHub Desktop.
2.Matrix of Palindromes
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