Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Reliability Engineering Designing And Operating Resilient Database Systems

Authors: Laine Campbell, Charity Majors

1st Edition

978-1491925942

More Books

Students also viewed these Databases questions

Question

=+3 What are the HR implications of being a transnational?

Answered: 1 week ago