Question: it's C++ please can put the answer as typing style so i can copy the answer. not a picture or screenshot Your country is at

 it's C++ please can put the answer as typing style so

it's C++

please can put the answer as typing style so i can copy the answer. not a picture or screenshot

Your country is at war and your enemies are using a secret code to com municate with each other. You have managed to intercept a message that reads as follows mmZ\dxZmxjZpgy The message is obviously encrypted using the enemy's secret code. You have just learned that their encryption method is based upon the ASCII code. Appendix 3 shows the ASCII character set. Individual characters in a string are encoded using this system. 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 each letter of the message and encrypts it as follows: If (OriginalChar Key 126) then EncryptedChar32 (COriginalChar Key) - 127) Else EncryptedChar (OriginalCharKey) 10 then the message "Hey" would be For example, if the enemy uses Key encrypted as Character ASCII code 72 101 121 Encrypted H = (72 + 10) = 82 -R in ASCII Encrypted e = (101 + 10) = 1 1 1 = o in ASCII Encrypted y 32((1210) 127) 36-$ in ASCII Consequently, "Hey" would be transmitted as "Ros." Write a program that decrypts the intercepted message. You only know that the key used is a number between 1 and 100. Your program should try to decode the message using all possible keys between 1 and 100 When you try the valid key, the message will make sense. For all other keys, the message will appear as gibberish

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!