#include
#include
using namespace std;
int main()
{
string input="";
string key="";
std::cout<<"Enter the string to be coded:\t";<br>std::getline(std::cin,input);
std::cout
std::getline(std::cin,key);
int keyl=key.length();
int inputl=input.length();
for(int j=0;keyl {
key+=key[j];
keyl++;
}
cout<<"\nKey:\t"<<key;<br>
string encrypted="";
for(int i=0; i {
encrypted+=key[i]^input[i];
}
std::cout
string unencrypted="";
for(int i=0;i {
unencrypted+=encrypted[i]^key[i];
}
std::cout<<"\nUnencrypted:\t"<<unencrypted;<br>
return 0;
}