Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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.
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