rendered paste body#include <string>
#include <iostream>
using namespace std;
int main()
{
string s;
cout << "enter input: ";
getline(cin, s);
for(string::iterator si = s.begin(); si != s.end(); si++)
*si+=5;
cout << "encrypted string: \"" << s << "\"" << std::endl;
char input;
cout << "do you wish to decrypt it? ";
cin >> input;
switch(input)
{
case 'y':
case 'Y':
{
for(string::iterator si = s.begin(); si != s.end(); si++)
*si-=5;
cout << "decrypted string: \"" << s << "\"" << std::endl;
break;
}
}
return 0;
}