EmadS3

Untitled

Dec 23rd, 2016
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.28 KB | None | 0 0
  1.             Console.Write("enter a word to encrypt: ");
  2.             string s = Console.ReadLine();
  3.             Console.Write("Enter key: ");
  4.             int key = int.Parse(Console.ReadLine());
  5.             for (int i = 0; i < s.Length; Console.Write((char)(((int)s[i] - 96 + key) % 26 + 96)), ++i) ;
  6.  
  7.             Console.ReadKey();
Advertisement
Add Comment
Please, Sign In to add comment