Advertisement
Guest User

MatrixOfPalindromes

a guest
Apr 9th, 2014
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.59 KB | None | 0 0
  1. using System;
  2.  
  3. namespace _7_MatrixOfPalindromes
  4. {
  5.     class MatrixOfPalindromes
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             int height = int.Parse(Console.ReadLine());
  10.             int width = int.Parse(Console.ReadLine());
  11.  
  12.             for (int row = 0; row < height; row++)
  13.             {
  14.                 for (int col = 0; col < width; col++)
  15.                 {
  16.                     Console.Write(""+(char)('a' + row) + (char)('a' + col + row) + (char)('a' + row) +" ");
  17.                 }
  18.                 Console.WriteLine();
  19.             }
  20.         }
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement