public static void Main()
Console.WriteLine("Hello World");
Console.WriteLine("Enter text to encrypt");
string txt2Encrypt = Console.ReadLine();
var encrpytedText = Encrpyt(txt2Encrypt);
Console.WriteLine("Encrpted text: " + encrpytedText);
public static string Encrpyt(string textToEncrypt)
string alphabets = "abcdefghijklmnopqrstuvwxyz";
string encryptedText = string.Empty;
char[] textToEncryptCharArray = textToEncrypt.ToLower().ToCharArray();
foreach (var chr in textToEncryptCharArray)
index = alphabets.IndexOf(chr) + 1;
encrpytedInt = index / 2;
encryptedText += "e" + encrpytedInt;
encrpytedInt = index * 3 + 1;
encryptedText += "o" + encrpytedInt;