Write a C++ program that encodes the user’s string so that they can send a "secret message" to their friends. In order to encode the string, we will use an integer offset value known as the codeInteger or encryption key. The encryption key must be between 1 and 35, inclusive. It is added to each character’s ASCII (decimal) value thus making it a new ASCII character. The letter "A" is ASCII 65. If we add 10 to it, it becomes ASCII 75, which is the letter K. Remember that spaces are also characters and should be encoded. Refer to an ASCII Character Code set to see a complete set of decimal/character values.

Solved
Show answers

Ask an AI advisor a question