SHARE
TWEET

Untitled

a guest Jun 12th, 2019 90 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Numerics;
  7.  
  8.  
  9. namespace Revision
  10. {
  11.     class ContinueTest
  12.     {
  13.         static void Main()
  14.         {
  15.             string input = Console.ReadLine().ToLower();          
  16.  
  17.             char[] letters = input.ToCharArray();
  18.  
  19.             string alphabet = "abcdefghijklmnopqrstuvwxyz";
  20.             char[] alphabetArray = alphabet.ToCharArray();
  21.  
  22.             int result = 0;
  23.             for (int i = 0; i < letters.Length; i++)
  24.             {
  25.                 for (int j = 0; j < alphabetArray.Length; j++)
  26.                 {
  27.                     if (letters[i] == alphabetArray[j])
  28.                     {
  29.                         result = j;
  30.                         Console.WriteLine("{0} -> {1}", letters[i], result);
  31.                     }
  32.                 }
  33.                
  34.             }
  35.         }
  36.     }
  37. }
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
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top