Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Your country is at war and your enemies are using a secret code. You have manage

ID: 3764102 • Letter: Y

Question

Your country is at war and your enemies are using a secret code. You have managed to intercept a message that reads as follows:

:mmZdxZmx]Zpgy

You have just learned that their encryption method is based upon the ASCII code. Appendi 3 shows the ASCII charcter set. Individual charcters in a string aree encoded using this system. For example, the letter "A" is encoded using this system. For example, the letter "A" is encoded using this sytem. For example, the letter "A" is encoded using the number 65 and "B" is encoded using the number 66.

Your Enemy's secret code takes eah letter of the message and encrypts it as follows:

If( OriginalChar + Key > 126) then

Encrypted Char = 32 + (( Original Char + Key )

Write a C++ Program that decrypts the intercepted message. The ASCII cods for the unencrypted message are limited to the visible ASCII characters. You only know that the key used is a number between 1 and 100.

Message will return: Attack at dawn

Explanation / Answer

#include #include #include using namespace std; void input(char message[100], int& key); vector encrypt(char message[100], int key); int main() { input(message[100], key); vector encrypt(char message[100], key); return 0; } void input(char message[100], int& key) { cout
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote