SHARE
TWEET

Untitled

fbinnzhivko May 30th, 2016 572 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2. class Program
  3. {
  4.     static void Main()
  5.     {
  6.         string word = Console.ReadLine();
  7.         char[] arr = new char[26];
  8.         for (int i = 0; i < arr.Length; i++)
  9.         {
  10.             arr[i] = (char)('a' + i);
  11.         }
  12.         for (int i = 0; i < word.Length; i++)
  13.         {
  14.             Console.WriteLine(word[i] + " -> " + Array.IndexOf(arr, word[i]));
  15.         }
  16.     }
  17. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top