Advertisement
Guest User

Untitled

a guest
Oct 12th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace IndeOfLetter
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. string arr = Console.ReadLine();
  14.  
  15.  
  16. string[] alpha = new string[]
  17. {"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"};
  18. for (int i = 0; i <= arr.Length-1; i++)
  19. {
  20. for (int r = 0; r <= alpha.Length-1; r++)
  21. {
  22. if (arr[i].ToString().CompareTo(alpha[r]) == 0)
  23. {
  24. Console.WriteLine(arr[i] +" -> "+r);
  25. }
  26. }
  27.  
  28. }
  29. }
  30. }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement