Advertisement
Daniel_007

04. Caesar Cipher

Mar 15th, 2020
1,434
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.51 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4.  
  5. namespace 04. Caesar Cipher
  6. {
  7.     class Program
  8.     {
  9.         static void Main(string[] args)
  10.         {
  11.             string text = Console.ReadLine();
  12.             string cipher = string.Empty;
  13.             for (int i = 0; i < text.Length; i++)
  14.             {
  15.                 char letter = text[i];
  16.                 letter += (char)3;
  17.                 cipher += letter;
  18.             }
  19.             Console.WriteLine(cipher);
  20.         }
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement