Question: A Caesar cipher is a simple way of obscuring words by shifting each letter in a word by a set amount n . For example,
A Caesar cipher is a simple way of obscuring words by shifting each letter in a word by a set amount n
For example, when the shift is n
the letter A becomes D and the letter B becomes E Letters near the end of the alphabet "wraparound", so that Z becomes C on a shift of
Write a void function charcaesar that accepts a single char by reference representing either a lowercase or an uppercase ASCII letter as well as a single int shift amount of to and then modifies the char by shifting it by the given amount.
Provide a comment before your declaration of charcaesar with a purpose statement in the same format from the course notes. The lab instructors will check for the purpose statement and it needs to be correct and clearly written in order to be marked correct. Don't forget to include any requirements on the arguments.
In your main function scan for a character c an uppercase or lowercase alphabetical character and an integer n from to and then use charcaesar to apply a shift of n to character c Finally, print the updated value of c followed by a newline character.
Note. You can assume all input follows the given specification.
Examples
inputCopy
A
outputCopy
D
inputCopy
Z
outputCopy
C
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
