#include <iostream>
#include <string>
usingnamespace std;
char caesar( char );
int main()
{
string input;
do {
cout << "Type the message you want to code and then press enter" << endl;
cout << "Press enter again if you want to quit because you are boring" << endl;
getline(cin, input);
string output = "";
for(int x = 0; x < input.length(); x++)
{
output += caesar(input[x]);
}
cout << output << endl;
} while (!input.length() == 0);
}
char caesar( char c )
{
if( isalpha(c) )
{
c = toupper(c);
c = (((c-65)+13) % 26) + 65;
}
return c;
}