Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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, 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started