Advertisement
Spocoman

04. Caesar Cipher

Apr 15th, 2023
673
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.Linq;
  3. using System.Collections.Generic;
  4. using System.Text;
  5.  
  6. namespace CaesarCipher
  7. {
  8.  
  9.     class Program
  10.     {
  11.         static void Main()
  12.         {
  13.             string text = Console.ReadLine();
  14.  
  15.             var encripted = Encoding.ASCII.GetBytes(text)
  16.                 .Select(x => (char)(x + 3));
  17.  
  18.             Console.WriteLine($"{string.Join("", encripted)}");
  19.         }
  20.     }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement