"C ++ In this assignment, you are to write a ROT13 (for "rotate 13") decoder to translate a secret message from its encoded state to something readable. In a ROT13 code, 'a' is shifted 13 letters to 'n', 'B' to 'O', 'c' to 'p', 'D' to 'Q', ..., 'N' to 'A', 'o' to 'b', 'P' to 'C', 'q' to 'd', etc. Only letters are affected; punctuation, spaces, and all other characters remain the same. Your program should read the secret message out of a file called "secretMessage.txt" and should write the decoded message into a file called "decodedMessage.txt" Please take care to name the files exactly as shown in this description, paying particular care to capitalization."
Please dont use advanced techniques im just learning all this stuff.
#include
#include
#include
#include
using namespace std;
int main()
{
ifstream inputFile;
ofstream outputFile;
char ch;
inputFile.open("secretMessage.txt");
outputFile.open("decodedMessage.txt");
ch=inputFile.get();
while (!inputFile.eof())
{
if ((ch>='A') && (ch<='Z'))
{
ch+=13;
}
else if ((ch>='a') && (ch<='z'))
{
ch+=13
}
ch=inputFile.get();
}
inputFile.close();
outputFile.close();
cout< return 0;
}