Question: 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 message_encipher.c, which scans in a message and enciphers it.
Each message will consist of a total of 4 letters. To encipher a message, we will scan in 4 numbers to add to each of these letters.
For example, if we have the message
"comp"
And, we scanned in the following 4 numbers:
527-2
Then, the message is enciphered to
"hqtn"
This is because:
'c'+5='h'
'o'+2='q'
'm'+7='t'
'p'+-2='n'
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 3 important notes on our ciphering technique: - Input numbers can be negative, for example if we want to encipher 'g' with the number -5, then we get 'b'
- If an enciphered letter goes outside the range of "a-z" then it must wrap around. This means that if an input letter is 'y' and the corresponding input number is 4, 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 150 and the corresponding enciphered letter would be 'b'

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!