Question
In 2017 Visual Studio C++ Exercise 8.4 The Captain Crunch decoder ring works by taking each letter in a string and adding 13 to it.
In 2017 Visual Studio C++
Exercise 8.4 The Captain Crunch decoder ring works by taking each letter in a string and adding 13 to it. For example, a becomes n and b becomes o. The letters wrap around at the end, so z becomes m. a. WriteafunctionthattakesaStringandthatreturnsanewStringcontainingthe encoded version. You should assume that the String contains upper and lower case letters, and spaces, but no other punctuation. Lower case letters should be tranformed into other lower case letters; upper into upper. You should not encode the spaces. b. Generalize the Captain Crunch method so that instead of adding 13 to the letters, it adds any given amount. Now you should be able to encode things by adding 13 and decode them by adding -13. Try it.
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