Advertisement
EmoRz

SMS

May 18th, 2018
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.00 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Others
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             var n = int.Parse(Console.ReadLine());
  10.             //
  11.             string[] arrAlpha = { "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", " " };
  12.             string[] arrNum = { "2", "22", "222", "3", "33", "333", "4", "44", "444", "5", "55", "555", "6", "66", "666", "7", "77", "777", "7777", "8", "88", "888", "9", "99", "999", "9999", "0" };
  13.             var str = "";
  14.             for (int i = 0; i < n; i++)
  15.             {
  16.                 var typeNumber = (Console.ReadLine());
  17.                 // 
  18.  
  19.                 for (int k = 0; k < arrNum.Length; k++)
  20.                 {
  21.                     if (typeNumber == arrNum[k])
  22.                     {
  23.                         str += arrAlpha[k];
  24.                     }
  25.                 }
  26.             }
  27.             Console.WriteLine(str);
  28.         }
  29.     }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement