You are on page 1of 1

#include <iostream>

using namespace std;

string nsr(string mes) {


const string s1="~qwertyuiop{}asdfghjkl|'zxcvbnm<>";
const char*
s2[]={"�","�","�","�","�","�","�","�","�","�","�","�","�","�","�","�","�","�","�","
�","�","�","�","�","�","�","�","�","�","�","�","�","�"};
string dist="";
int n=mes.length();
for (int i=0; i<n; i++){
int pos=s1.find_first_of(mes[i]);//����� ������� ����� ������� �� ���������
if (pos!=string::npos) dist=dist+s2[pos];
else dist=dist+mes[i];
}
return dist;
}
int main(){
string src,DIST;
getline(cin,src);
DIST=nsr(src);
cout<<DIST;
}

You might also like