Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please write down C++ code E3. Encoding characters Write a program that will encode a message using the ASCII character encoding scheme Character ABC DEF

image text in transcribedPlease write down C++ code

E3. Encoding characters Write a program that will encode a message using the ASCII character encoding scheme Character ABC DEF G HI J KLM ASCII 65 66 67 68 69 70 717273 7475 76 77 Character N O P Q R S T u v w Y Z ASCII787980 81 8283 84 85 86 87 8889 90 Character a bcd fghijkm ASCII 97 98 99100 101 102 103104 105 106 107 108109 Character n o Pqrtu wXy z Specifications: 1. The program will encode the characters with a Caesar cipher; one of the earlier forms of encryption. Please see for details: https://en.wikipedia.org/wiki/Caesar cipher For this question, the user will enter a single character and the program will output an encoded character. The character must be encoded with a right shift of 7 (different shift value than the link posted) 2. For example, if a user enters the character 'd', with an ASCII value of 100, the encoded character will be 'k', with an ASCII value of 107. a. b. Your program must encode any upper or lowercase character specified in the chart above You must handle the cases where adding a shift to the character values produces a number outside of the range shown in the tables above. You may use an arithmetic expression using the modulo operator to "loop" around the table once exceeding an appropriate range, or you can handle the "edge cases" using if-else statements. Hint: IF adding an offset to the ASCII value moves the character outside of the range THEN perform a subtraction to the result to return to the start of the table. Be prepared to discuss how the modulus operator can be used to accomplish this with your TA. Likewise, if you have questions using this operator, email your TA for extra clarification. If the user enters a character to encode that is outside of the ranges shown above, inform the user of the incorrect input and suggest they run the program again for another attempt If the user enters X, the output encoded character will be . 3. 4. 5. Sample Output: /First time running the program Input a character to encode (a-z or A-Z):" An incorrect character was input, please run the program again to input a new character. //Second time running the program Input a character to encode (a-z or A-Z): v The encoded character is: C

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Larry Ellison Database Genius Of Oracle

Authors: Craig Peters

1st Edition

0766019748, 978-0766019744

More Books

Students also viewed these Databases questions