Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Disclaimer: The creator of 'C# Shell (C# Offline Compiler)' is in no way responsible for the code posted by any user.
- using System;
- using System.IO;
- using System.Linq;
- using System.Collections.Generic;
- namespace CSharp_Shell
- {
- public static class Program
- {
- public static void Main()
- {
- int input = int.Parse(Console.ReadLine());
- string message = string.Empty;
- for(int i=0;i<input;i++)
- {
- string digits = Console.ReadLine();
- int mainDigit = digits[0]-'0';
- int lenght = digits.Length;
- int offset = (mainDigit-2)*3;
- int index= offset+(lenght-1);
- if(mainDigit==0)
- {
- message +=(char)(index+32);
- continue;
- }
- if(mainDigit == 7 || mainDigit== 9);
- {
- offset++;
- }
- message += (char)(index+97);
- }
- Console.WriteLine(message);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement