#include <iostream> #include <string> #include <vector>using namespace Std;int alpha2num (char c) {int num = 0;switch (c) {case ' 1 ': num = 1;break;case ' A ': Case ' B ': Case ' c ': num = 2;break;case ' d ': Case ' e ': Case ' f ': num = 3;break Case ' G ': Case ' h ': Case ' i ': num = 4;break;case ' j ': Case ' K ': Case ' l ': num = 5;break;case ' m ': Case ' n ': Case ' o ': num = 6;brea K;case ' P ': Case ' Q ': Case ' r ': Case ' s ': num = 7;break;case ' t ': Case ' u ': Case ' V ': num = 8;break;case ' W ': Case ' x ': Case ' y ': CA Se ' z ': num = 9;break;case ' 0 ': num = 0;break;default:num =0;break;} return num;} int main () {string str;vector<char> Vec;char ch;while (cin>>str) {for (size_t i = 0; i < str.length (); ++i) {if (str[i]>= ' A ' && str[i] <= ' z ') {int num = Alpha2num (str[i]); ch = ' 0 ' + num;} else if (Str[i] >= ' A ' && str[i] <= ' Z ') {ch = ' a ' + (Str[i]-' a ' + 1)%26;} Else{ch = Str[i];} Vec.push_back (CH);} for (size_t i = 0; i < vec.size (); ++i) {cout<<vec[i];} Cout<<endl;} return 0;}
Simple password hack