Question: WRITE THE CODE IN C++ Secret Codes! Create a program that will accept a message from the user and either encrypt ordecrypt it with the

WRITE THE CODE IN C++

Secret Codes!

Create a program that will accept a message from the user and either encrypt ordecrypt it with the following algorithms:

To encrypt:

get the character you wish to encrypt

find the index of that character in the alphabet array

add the shift offset to the index

add the increment to the index

"wrap around" the new index so the result is between 0 and 29

find the character at the new index

To decrypt:

get the character you wish to decrypt

find the index of that character in the alphabet array

subtract the shift offset from the index

subtract the increment from the index

"wrap around" the new index so the result is between 0 and 29

find the character at the new index

repeat steps 1-6 for every shift offset

The alphabet is ,a-z(lowercase),,, and in that order.

The increment should be +3 per letter position.

Here is a sample message. Who said it?

f..yqjrnvrpuabefw.j,ddxgcndpxmsdehsomjkcydfygtd.rrp?dgstmvxmf.wo?jxgrneslzifrgzyqv.v

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!