Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ConsoleApplication4
- {
- class Program
- {
- static void Main(string[] args)
- {
- int rows = int.Parse(Console.ReadLine());
- int cols = int.Parse(Console.ReadLine());
- char mainCharacter;
- string alphabet1 = "abcdefghijklmnopqrstuvwxyz";
- char[] alphabet = alphabet1.ToArray();
- char helpCharacter;
- string[,] matrix = new string[rows, cols];
- string output = string.Empty;
- for (int row = 0; row < matrix.GetLength(0); row++)
- {
- for (int col = 0; col < matrix.GetLength(1); col++)
- {
- mainCharacter = alphabet[row];
- helpCharacter = alphabet[col + row];
- Console.Write("{0}{1}{2}{3}", mainCharacter, helpCharacter, mainCharacter, " ");
- }
- Console.WriteLine();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment