subject

Your program will contain 3 functions - main, Encrypt and Decrypt. All user interactivity (i. e. cin / cout) should be limited to within main only.
Your Encrypt function will take two parameters - a char pointer to an input string and an integer value called secret code - and return a char pointer. Use the function prototype: char* Encrypt(char* input, int secret);
Similarly, your Decrypt function will take two parameters - a char pointer to an encrypted string and an integer value called secret code - and return a char pointer. Use the function prototype: char* Decrypt(char* encrypted, int secret);
In your main, your program will first ask the user for an integer value that will be used as the secret to encrypt or decrypt the text. Provide an clear prompt to get the value.
Pass the input string from main using pointers and secret code to the Encrypt function to encode the input string by
Declaring a new character array in your function where you will copy the contents of the input array either before or during the following actions.
Down shifting (i. e. moving in the increasing direction) each character in the ASCII character-set by the number of the secret code, followed by
Reversing the characters in the shifted string
Do not use either C-string or C++ string helper functions.
There should be no user interactivity in the function.
Return the pointer to the new character array to the main.
In the main, the pointer returned by the Encrypt function should be stored in an appropriate variable named encrypted and then passed as an argument to the Decrypt function.
Pass the encrypted string from main by pointers and secret code to the Decrypt function to decode the string by
Declaring a new character array in your function where you will copy the contents of the encrypted array either before or during the following actions.
Reversing the characters of the string
Up shifting (i. e. moving in the decreasing direction) each character of the reversed string by the number of the secret code
Do not use either C-string or C++ string functions.
There should be no user interactivity in the function.
If decrypted correctly, it should change back to the original string input by the user.
Return the pointer to the new character array to the main.
In the main, the pointer returned by the Decrypt function should be stored in an appropriate variable named decrypted.
End the main by printing the original input string, the encrypted string and decrypted string. All three should be printed only after both Encrypt and Decrypt are finished. See the sample output below on what to print.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 09:30
Is a string of code written to hurt others by damaging or destroying
Answers: 1
question
Computers and Technology, 22.06.2019 15:30
In a compound condition, both conditions on either side of the logical operator and must be true for the overall condition to be true. a: true b: false
Answers: 1
question
Computers and Technology, 23.06.2019 02:30
Three out of five seniors remain undecided about a college major at the end of their senior year.
Answers: 3
question
Computers and Technology, 23.06.2019 02:30
People with high self-esteem: accept their strengths and weaknesses. believe that failed experiences are failures of their whole self. feel good about who they are only when they reach total success. need positive external experiences to counteract negative feelings that constantly plague them.
Answers: 1
You know the right answer?
Your program will contain 3 functions - main, Encrypt and Decrypt. All user interactivity (i. e. ci...
Questions
question
Mathematics, 09.12.2019 23:31
Questions on the website: 13722367