Advertisement
elena1234

CaesarCipher

Nov 13th, 2020 (edited)
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.42 KB | None | 0 0
  1. using System;
  2. using System.Text;
  3.  
  4. namespace CaesarCipher
  5. {
  6.     class MainClass
  7.     {
  8.         public static void Main(string[] args)
  9.         {
  10.             string text = Console.ReadLine();
  11.             StringBuilder sb = new StringBuilder();
  12.  
  13.             foreach (var symbol in text)
  14.             {
  15.                 sb.Append((char)(symbol + 3));
  16.             }
  17.  
  18.             Console.WriteLine(sb);
  19.         }
  20.     }
  21. }    
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement