Answered step by step
Verified Expert Solution
Link Copied!

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=3
, the letter 'A' becomes 'D' and the letter 'B' becomes 'E'. Letters near the end of the alphabet "wrap-around", so that 'Z' becomes 'C' on a shift of 3.
Write a void function char_caesar that accepts a single char by reference (representing either a lower-case or an upper-case ASCII letter) as well as a single int shift amount of 0 to 25, and then modifies the char by shifting it by the given amount.
Provide a comment before your declaration of char_caesar 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 upper-case or lower-case alphabetical character) and an integer n (from 0 to 25) and then use char_caesar 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

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

Step: 3

blur-text-image

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

Oracle Databases On The Web Learn To Create Web Pages That Interface With Database Engines

Authors: Robert Papaj, Donald Burleson

11th Edition

1576100995, 978-1576100998

More Books

Students also viewed these Databases questions

Question

Calculate the lifetime value (LTV) of a loyal customer.

Answered: 1 week ago

Question

Use service tiering to manage the customer base and build loyalty.

Answered: 1 week ago