Computers and Technology
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

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 21:30, Cheflulu5727
Write a function named printfloatrepresentation(float number) that will print the floating point representation of a number using the format given below. (sign bit) exponent in binary (assumed bit).significandfor example if the number passed an argument is 71 yourprogram should print (0) 10000101 (1).00011100000000000000000similarl y if the number passed to the function as argument is -71 the program should print (1) 10000101 (1).00011100000000000000000
Answers: 3
image
Computers and Technology, 23.06.2019 06:00, sebcbal
When is a chart legend used a. all the time b. whenever you are comparing data that is the same c. whenever you are comparing multiple sets of data d. only for hand-drawn charts
Answers: 2
image
Computers and Technology, 24.06.2019 07:50, treytonmesser
Write a defining table and then a program that determines if you can sleep in or not. your program should get all its input from your computer’s clock. on all weekdays (monday through friday) that are not holidays, your program should output “get up! ” on all other days (weekends and holidays), your program should output “sleep in.” the three holidays that your program must check for are january 1 (new year’s day), july 4 (u. s. independence day), and december 25 (christmas). you don’t need to include other holidays in your program because most other holidays do not occur on a fixed day each year.
Answers: 1
image
Computers and Technology, 24.06.2019 08:00, ineemorehelp
Arah has entered data about football players from team a and team b in a worksheet. she enters names of players from team a with details about each player in different columns of the worksheet. similarly, she enters details of all the players from team b. which option will her view the data for team a and team b in two separate sections after printing? a. page break view b. freeze pane view c. split screen view d. full screen view e. zoom out view
Answers: 1
Do you know the correct answer?
Topics: New, Delete, Characters, Strings, C++ strings, C strings Cryptography— the science of secre...

Questions in other subjects:

Konu
Mathematics, 23.02.2021 20:50
Konu
History, 23.02.2021 20:50