Question: Here is the starter code: #include #include #include using namespace std; int main() { vector normalV(26); vector cipherV(26); string toDec = ; string beenDec =

 Here is the starter code: #include #include #include using namespace std;

Here is the starter code:

#include #include #include using namespace std;

int main() { vector normalV(26); vector cipherV(26); string toDec = ""; string beenDec = ""; normalV.at(0) = 'n'; cipherV.at(0) = '{'; // Get secret message do { cout

beenDec = toDec;

// Decrypt secret message if (toDec.at(0) == cipherV.at(0)) { beenDec.at(0) = normalV.at(0); } cout

PA5: Decrypting a secret message In this assignment, youll decrypt a secret message using a cipher A cipher is a program tha converts a message in normal text into a secret message, and vice-versa. For example, the normal message 'meet at five p might be converted to the secret message "a@, (ak@)r using a cipher. The secret message can be sent to a friend. Nobody else could read the message, expect the friend whose cipher would convert the secret message back to normal The starter program decrypts the first character in a secret message if that first character is T. The complete list of cipher and normal characters to decrypt a message: 'a 'd' 'e' 'h' 'n' 'S 'o' 1) Decrypt by hand the following secret message: Then, modify the program to decrypt al instances of Tin the secret message to 'n. 2) Modify the program to decrypt all instances of 3 more decryptions: Your program should decrypt the folowing secret message: 3) Add the remaining 22 decryptions. Instead of coding 22 more branch statements, loop through the cipherV vector. Refer to the Multiple vectors section for an example of a program with two Here is an example program execution ser input is highlighted here for clarity): Enter a secret message: (H&L Decrypted message nice Here is an example program execution (user input is highlighted here for carity): Enter a secret message: leg,

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!