Question: The following is some code to help you get started: This is a C++ problem. Please give full explanation and code in details. Thanks, A

 The following is some code to help you get started: This

is a C++ problem. Please give full explanation and code in details.

Thanks, A Caesar cipher is a mechanism of encryption where every letter

The following is some code to help you get started:

in a message is rotated by a pre- agreed upon amount; thus

This is a C++ problem. Please give full explanation and code in details. Thanks,

A Caesar cipher is a mechanism of encryption where every letter in a message is rotated by a pre- agreed upon amount; thus scrambling the important message Ex) 1. Take the English alphabet :ABCDEFGHIJKLMNOPQRSTUVWXYZ 2. Define how far to rotate: a. +3 3. The cipher is: DEFGHlJKLMNOPQRSTUVWXYABC; where plaintext 'A' = ciphertext 'D, plaintext B' = ciphertext E', and so on. 4. Write down a message in English: HELP 5. To encrypt, translate that message using the cipher. H->K, E-> H,L->O, P-> S a. HELP-> KHOS To decrypt a ciphertext message, translate it back into English by reversing the process. For example, with rotation amount +3, KHOS -> HELF. 6. Objectives: Write a C++ program that will: 1. Input: a. prompt the user to encrypt or decrypt. b. Prompt the user for an amount to rotate by (0 - 25) i. 0 would mean the message remains clear text A-A ii. 25 would mean that A-Z Prompt the user for a message Decrypt or Encrypt as appropriate and print out the translated message The program should prompt the user for all INPUT, then after the prompt and input is c. 2. Output: a. 3. Error Conditions: a. complete If the encryption/decryption mode is invalid, you must quit the program. If the rotation is> 25 or 25 or HELP ME PLEASE!->HELPMEPLEASE A couple of tips: This application will use SEVERAL loops throughout the program. You can loop through a string using a for loop, and use the function at(position) to get the character value. o string str = "CLIFFORD" o char cstr.at (0) o c would equal C'://aka 67 ascii value You may find use in examining an ASCII table for hints on how to convert from lower case to UPPERCASE letters. Google 'ASCII table' for an example. Or the ASCII table is Appendix 3 in the textbook. When using cin and getline you must make sure to flush the buffer. To make this EASY on you, we have included some code to help you get started. It declares the 3 input variables and sets up the prompt. You will NOT need to modify the prompt, just starting your code below it. getline is used to get a string with whitespace in it. #include using namespace std; int main) ( //START DO NOT MODIFY int rotate; char mode; string message; cout >mode; cout

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!