Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Complete the C program message _ encipher.c , which scans in a message and enciphers it . Each message will consist of a total of
Complete the C program messageencipher.c which scans in a message and enciphers it
Each message will consist of a total of letters. To encipher a message, we will scan in numbers to add to each of these letters.
For example, if we have the message
"comp"
And, we scanned in the following numbers:
Then, the message is enciphered to
hqtn
This is because:
ch
oq
mt
pn
Pull up an ascii table if you want to double check this! You can do this with the command ascii d run in the terminal.
In this exercise, you will only be given letters as input can be lower or uppercase! and will need to follow the rules above.
There are important notes on our ciphering technique: Input numbers can be negative, for example if we want to encipher g with the number then we get b
If an enciphered letter goes outside the range of az then it must wrap around. This means that if an input letter is y and the corresponding input number is then the enciphered letter is c
There is no limit on an input number. This means that we could have an input letter like h with a corresponding input number and the corresponding enciphered letter would be b
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