Question: This is a problem I have that needs to be done in C++ The Caesar cipher, named after Julius Caesar, is one of the most
This is a problem I have that needs to be done in C++
The Caesar cipher, named after Julius Caesar, is one of the most well-known techniques used to encrypt messages. Caesar's cipher was used to protect military messages by shifting each letter in the message by 3 characters in the alphabet. When the message was delivered, the recipient would shift each letter by 3 places the opposite direction and the actual message would appear. Unfortunately, as you probably know, the Caesar cipher is very weak and can be easily broken by letter frequency analysis. For this in-class, you are to: Ask the user for a lowercase string containing no spaces Read in the string Ask the user for an integer shift factor to the right Read in the shift Write a function to encrypt the string Print out the new string Decrypt the string too. You should be able to test your function by encrypting and decrypting a string with the same shift value to obtain the original, unencrypted string. Check to be sure the user only enters lower-case letters and no spaces and enforce this with a do-while loop
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
