Advertisement
Alekscho85

MatrixOfPalindromes

Oct 27th, 2014
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.68 KB | None | 0 0
  1. using System;
  2. namespace _07.MatrixOfPalindromes
  3. {
  4.     class MatrixOfPalindromes
  5.     {
  6.         static void Main()
  7.         {
  8.             int r = int.Parse(Console.ReadLine());
  9.             int c = int.Parse(Console.ReadLine());
  10.             string[] alphabet = { "0", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z" };
  11.             for (int i = 1; i <= r; i++)
  12.             {
  13.                 for (int j = 0; j < c; j++)
  14.                 {
  15.                     Console.Write("{0}{1}{0} ", alphabet[i], alphabet[i + j]);
  16.                 }
  17.                 Console.WriteLine();
  18.             }
  19.         }
  20.     }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement