Write a program that receives a coded message file(Lab3ExtraCreditCT.txt) from your local espionage agent and decodes it into a file using standard English. The problem is your agent forgot to tell you the key used to decode the message. Fortunately, this is a simple substitution code consistently using 1 alphanumeric character to represent another, this is case sensitive. All other characters are not substituted, so a space will always be a space, a – will always be a –, a @ will always be a @, etcetera. You may use the following table to help you, it contains the most common letters used in the English language in descending order. E A R I O T N S L C U D P M H G B F Y W K V X Z J Q 0 5 3 2 4 6 8 1 9 7 Using the following key to convert plaintext to coded text: Plaintext = Now is the time for all good men to come to the aid of their country. Key = THEQUICKBROWNFXJMPSVLAZYDG The file your program outputs should look like this: Coded Text = Fxz bs vku vbnu ixp tww cxxq nuf vx exnu vx vku tbq xi vkubp exlfvpd. Vice versa, using coded text with the same key reverses the message back to plaintext. Plaintext = Fxz bs vku vbnu ixp tww cxxq nuf vx exnu vx vku tbq xi vkubp exlfvpd. Key = THEQUICKBROWNFXJMPSVLAZYDG The file your program outputs should look like this: Coded Text = Now is the time for all good men to come to the aid of their country. ----- Please show exactly how it is with images attached!
Write a
E A R I O T N S L C U D P M H G B F Y W K V X Z J Q 0 5 3 2 4 6 8 1 9 7
Using the following key to convert plaintext to coded text:
Plaintext = Now is the time for all good men to come to the aid of their country.
Key = THEQUICKBROWNFXJMPSVLAZYDG
The file your program outputs should look like this:
Coded Text = Fxz bs vku vbnu ixp tww cxxq nuf vx exnu vx vku tbq xi vkubp exlfvpd.
Vice versa, using coded text with the same key reverses the message back to plaintext.
Plaintext = Fxz bs vku vbnu ixp tww cxxq nuf vx exnu vx vku tbq xi vkubp exlfvpd.
Key = THEQUICKBROWNFXJMPSVLAZYDG
The file your program outputs should look like this:
Coded Text = Now is the time for all good men to come to the aid of their country.
-----
Please show exactly how it is with images attached!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 4 images