VelizarAvramov

09. Index of Letters

Nov 25th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.41 KB | None | 0 0
  1. using System;
  2.  
  3. namespace _09._Index_of_Letters
  4. {
  5.     class IndexOfLetters
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             string word = Console.ReadLine();
  10.                      
  11.             foreach (char letter in word)
  12.             {
  13.                 int foundIndex = letter - 97;
  14.                 Console.WriteLine($"{letter} -> {foundIndex}");
  15.             }
  16.         }    
  17.     }
  18. }
Add Comment
Please, Sign In to add comment