Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In C++ Task B. Implementing Caesar cipher encryption Write a program caesar.cpp with functions implementing Caesar cipher encryption: //A helper function to shift one character

In C++

image text in transcribed

Task B. Implementing Caesar cipher encryption Write a program caesar.cpp with functions implementing Caesar cipher encryption: //A helper function to shift one character by rshift char shiftchar(char c, int rshift); /Caesar cipher encryption string encryptCaesar(string plaintext, int rshift); The argument rshift is the magnitude of the right shift. For the sake of the lab, you may assume it to be in the range 0 s rshift s 25 (although, implementing it correctly for an arbitrary integer shift is also possible, of course) Your functions should preserve case, and any non-alphabetic characters should be left unchanged. For example, encryptCaesar("Way to Go!", 5) -- "Bfd yt Lt!" Feel free to write more additional helper functions when you need them The main function should ask the user to input a plaintext sentence, then enter the right shift, and report the ciphertext computed using your encryption function Example: $ ./caesar Enter plaintext: Hello, World! Enter shift :10 ciphertextR Rovvy, Gybvn

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

Database Driven Web Sites

Authors: Mike Morrison, Joline Morrison

1st Edition

061901556X, 978-0619015565

More Books

Students also viewed these Databases questions

Question

3. An overview of the key behaviors is presented.

Answered: 1 week ago

Question

2. The model is credible to the trainees.

Answered: 1 week ago