#include<iostream> #include<fstream> #include<string> using namespace std; int main() { ifstream fin("input.txt"); ofstream fout("output.txt"); string str; int key; cout<<"~B ~R~]~D ~^~E| ~U~X~K~\~X: "; cin>>key; int count=1; while(!fin.eof()) { if(fin.get()=='\n') count++; } fin.close(); ifstream fin1("input.txt"); for(int i=0;i<count;i++) { getline(fin1, str); for(string::iterator i=str.begin();i!=str.end();i++) (*i)+=key; cout<<str<<endl; for(i=str.begin();i!=str.end();i++) (*i)-=key; fout<<str<<endl; cout<<"-> "<<str<<endl; } fin1.close(); fout.close(); return 0; }