subject
Computers and Technology, 03.07.2021 09:40 tttyson

Topics: New, Delete, Characters, Strings, C++ strings, C strings Cryptography— the science of secret writing — is an old science; the first recorded use was well before1900 B. C. An Egyptian writer used previously unknown hieroglyphs in an inscription. We will use a simple substitution cypher called rot13 to encode and decode our secret messages. ROT13 ("rotate by 13 places", sometimes hyphenated ROT-13) is a simple letter substitution cipher that replaces a letter with the 13th letter after it, in the alphabet. ROT13 is a special case of the Caesar cipher which was developed in ancient Rome.
Decryption KeyA|B|C|D|E|F|G|H|I|J|K|L|MN|O|P|Q |R|S|T|U|V|W|X|Y|Z(letter above equals below, and vice versa)As you can see, A becomes N, B becomes O and so on.
Your job is to write a program, with at least four functions, including main, which must do the following:
1. Ask user whether they want to encode or decode a message – if no, then terminate
2. Take the input string from the user, store it in dynamic memory (use new)
3. As appropriate, encode or decode the message using Rot13.
4. Output the encoded/decoded message
5. Delete the input string from dynamic memory (use delete)
Input will be a string of no more than 25 characters. Blanks get replaced with blanks. Do not worry about punctuation; there will be no punctuation in the string.
ALPHABET becomes NYCUNORG
Test your program with the following strings:
TAF
VF
paddrpf
I’ll be using other strings to test your code. Some suggestions (NOT requirements):
1. C++ string library functions would be useful here
2. You can process the C++ string one char at a time if you use the length member function

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 22:00
Formula that contains a nested function that first calculates the average of the values in range e6: p6 and uses the round function to round that average to the nearest 10 dollars. use -1 for the value of the number digit argument. would the formula be =round(average(e6: p6),0
Answers: 1
question
Computers and Technology, 22.06.2019 18:30
The "instance" relationship shows that something is an object of a
Answers: 1
question
Computers and Technology, 23.06.2019 18:40
How does is make you feel when you're kind to others? what are some opportunities in your life to be more kind to your friends and loved ones? imagine a world where kindness has be outlawed. how would people act differently? would your day-to-day life change significantly? why or why not?
Answers: 2
question
Computers and Technology, 24.06.2019 13:30
What process should be followed while giving a reference? sam has given a reference of his previous manager in his resume. sam should him in advance that the potential employers will him.
Answers: 1
You know the right answer?
Topics: New, Delete, Characters, Strings, C++ strings, C strings Cryptography— the science of secre...
Questions
question
English, 04.11.2020 06:10
question
Social Studies, 04.11.2020 06:10
question
History, 04.11.2020 06:10
question
Mathematics, 04.11.2020 06:10
question
Mathematics, 04.11.2020 06:10
question
Mathematics, 04.11.2020 06:10
question
Mathematics, 04.11.2020 06:10
question
Mathematics, 04.11.2020 06:10
Questions on the website: 13722360