When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.
4 messages · Page 1 of 1 (latest)
When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.
#include <iostream>
using namespace std;
int main()
{
string input;
cout << "Enter a letter (A - Z): " ; getline(cin, input);
string output = "";
for (int i = 0; i < input.length(); i++) { char c = input[i];
if (isalpha(c)) { if (isupper(c)) { c = 'A' + (c - 'A' + 13) % 26; }
else { c = 'a' + (c - 'a' + 13) % 26; } } output += c; }
cout <<"ROT13 Caesar Cipher for " <<input; cout <<" - > " << output; return 0;
}
That's my code for the Rot13 translation but I don't know how to display an Error
Homework help (ROT13)