Question: Create a C++ program that allows the user to enter a text, such as the one seen in the picture, and displays the decrypted message.
Create a C++ program that allows the user to enter a text, such as the one seen in the picture, and displays the decrypted message. The user should also be able to enter the "n" value of the shift, dictating the how many places the Caeser Cipher shifts the letters in the alphabet. The program must be able to compute lowercase as well as uppercase letters and symbols, which are not encrypted. If possible, use the equation seen at the top of the picture.

The Caesar Cipher can be represented using modular arithmetic as follows. Enc(x) (x + n) mod 26 This means that the encryption of a letter x is equal to a right shift of x by n letters. The result of the process is then taken under modulo division, meaning that if a letter is shifted past the end of the alphabet, it wraps around to the beginning Now, you are given below a cipher text encrypted using Caesar Cipher. "Fhewhqccydw qdt shofjewhqfxo ghu vkd. Oek sd tushofj jxyi cuiiqwu kiydw rhkju vehsu qjjqsa. Sxusai gbb feiiyrbu auoi kdjyb jxu sehhusj edu yi vekdt." Where the period () and comma () symbols are not encrypted. Write a program to decrypt this message by exhaustively search over all possible 26 keys
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
