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 20:00
Need asap assignment directions: think of an organization (business, religious institution, volunteer organization, sports team) with which you have been involved. imagine outfitting it with an it infrastructure. prepare a plan for what you would do to support outfitting it. draw a map of a network connecting all the individuals, give them pcs and printers, and lay out the design as best you can. the purpose is to begin working with these concepts, not to build a perfect network.
Answers: 2
question
Computers and Technology, 23.06.2019 07:30
Which option allows you to view slides on the full computer screen?
Answers: 1
question
Computers and Technology, 23.06.2019 14:30
Choose the answers that best complete each sentence. on average,are more expensive than other kinds of postsecondary schools. the cost of room and board includes. to save money, some students attend auniversity in their home state.
Answers: 2
question
Computers and Technology, 23.06.2019 20:30
If an appliance consumes 500 w of power and is left on for 5 hours, how much energy is used over this time period? a. 2.5 kwh b. 25 kwh c. 250 kwh d. 2500 kwh
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, 18.02.2021 06:00
question
Arts, 18.02.2021 06:00
question
World Languages, 18.02.2021 06:00
question
Physics, 18.02.2021 06:00
question
Mathematics, 18.02.2021 06:00
Questions on the website: 13722359