Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Console.Write("enter a word to encrypt: ");
- string s = Console.ReadLine();
- Console.Write("Enter key: ");
- int key = int.Parse(Console.ReadLine());
- for (int i = 0; i < s.Length; Console.Write((char)(((int)s[i] - 96 + key) % 26 + 96)), ++i) ;
- Console.ReadKey();
Advertisement
Add Comment
Please, Sign In to add comment