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.Threading.Tasks;
- namespace IndexOfLetter
- {
- class Program
- {
- static void Main(string[] args)
- {
- int[] alphabet = new int[26];
- string input = Console.ReadLine();
- for (int i = 0; i < alphabet.Length; i++)
- {
- alphabet[i] = 97 + i;
- }
- for (int i = 0; i < input.Length; i++)
- {
- for (int j = 0; j < alphabet.Length; j++)
- {
- if (alphabet[j] == input[i])
- {
- Console.WriteLine("{0} -> {1}", input[i], j);
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment