Advertisement
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.Text.RegularExpressions;
- namespace shano
- {
- class Program
- {
- static void Main(string[] args)
- {
- Dictionary<string, int> message = new Dictionary<string, int>();
- message.Add("A", 65);
- message.Add("B", 66);
- message.Add("C", 67);
- message.Add("D", 68);
- message.Add("E", 69);
- message.Add("F", 70);
- message.Add("G", 71);
- message.Add("H", 72);
- message.Add("I", 73);
- message.Add("J", 74);
- message.Add("K", 75);
- message.Add("L", 76);
- message.Add("M", 77);
- message.Add("N", 78);
- message.Add("O", 79);
- message.Add("P", 80);
- message.Add("Q", 81);
- message.Add("R", 82);
- message.Add("S", 83);
- message.Add("T", 84);
- message.Add("U", 85);
- message.Add("V", 86);
- message.Add("W", 87);
- message.Add("X", 88);
- message.Add("Y", 89);
- message.Add("Z", 90);
- string inputText = (Console.ReadLine()).ToUpper();
- string[] inputParameter = new string[inputText.Length];
- //pylnim masiva
- for (int i = 0; i < inputText.Length; i++)
- {
- inputParameter[i] = inputText[i].ToString();
- if (message.ContainsKey(inputParameter[i]))
- {
- Console.Write(message[inputParameter[i]] + " ");
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement