Question
ROT13(rotate by 13 places) is a simple letter substitution cipher that is an instance of a Caesar cipher developed in ancient Rome and used by
ROT13(rotate by 13 places) is a simple letter substitution cipher that is an instance of a Caesar cipher developed in ancient Rome and used by Julius Caesar who used it in his private correspondence. ROT13 replaces a letter with the letter 13 letters after it in the alphabet. The following table demonstrates the translation in ROT13:
A - N
B - O
C - P
D - Q
E - R
F - S
G - T
H - U
I - V
J -W
K - X
L - Y
M - Z
Thus, the translation of the word JULIUS using ROT13 would be WHYVHF. Write a C++ program that asks the user for the name of an input file and translates the contents of that input file using ROT13. Your main function should be responsible for reading the unput file and coordinating calls to a function named Rot13 that will do the translation for each character and WriteTranslationChar that will write the translated charecter to the secondary file. The Rot13 function should be defined with a reference parameter that will be the initial charecter as input and the translated charecter output. The second function named WriteTranslatedChar will have two parameters, the translated charecter and a reference to the ifstream data type for a secondary file named "output.rot13", and write that translated charecter to this file.
Will be deducted for not formatting program properly, also be deducted for using code not covered in chapters 1-8.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started