Question: You will prompt the user to enter an encrypted 10-character String, and then decrypt it and print out the unencrypted message. You can assume the

 You will prompt the user to enter an encrypted 10-character String,

You will prompt the user to enter an encrypted 10-character String, and then decrypt it and print out the unencrypted message. You can assume the original String only contained alphabetical characters. The rules used to encrypt the String are as follows: 1. The String is split in half, and the two halves are swapped. a. The substring of characters in indexes 0-4 are swapped with the substring of characters in the indexes 5-9, both inclusive, while maintaining their current order. 2. Every letter 'e' is replaced with a '?'. 3. The fifth character is appended to the end of the String. 4. The fifth character is replaced by a '4'. Example Step Initial String The String is split in half, and the two halves are swapped. Every letter 'e' is replaced with a '?' The fifth character is appended to the end of the String. The fifth character is replaced by a '4'. Characters ctersChara ct?rsChara ct?rsCharas ct?r4Charas You will need to derive the decryption rules from the encryption rules. Sample Output Welcome to the Decryption Puzzle solver! Please enter a 10-character encrypted String: [ct?r4Charas) The unencrypted String is: Characters

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!