Advertisement
Guest User

Untitled

a guest
Jun 2nd, 2016
940
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 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 _02MatrixPolindromes
  8. {
  9. class MatrixPolindromes
  10. {
  11. static void Main(string[] args)
  12. {
  13. List<int> list = Console.ReadLine().Split(' ').Select(int.Parse).ToList();
  14. int matrixRow = list[0];
  15. int matrixCol = list[1];
  16. string[,] matrix = new string[matrixRow, matrixCol];
  17. for (int row = 0; row < matrixRow; row++)
  18. {
  19. for (int col = 0; col < matrixCol; col++)
  20. {
  21. matrix[row,col] = "" + (char)('a' + row) + (char)('a' + row + col) + (char)('a' + row);
  22.  
  23. }
  24. }
  25. for (int row = 0; row < matrixRow; row++)
  26. {
  27. for (int col = 0; col < matrixCol; col++)
  28. {
  29. Console.Write(matrix[row,col] + " ");
  30. }
  31. Console.WriteLine();
  32. }
  33.  
  34. }
  35. }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement