您的位置:首页 > 其它

uva 10222 - Decode the Mad man

2016-01-04 13:08 260 查看
#include <iostream>
#include <string>
#include <cctype>
using namespace std;

int main(int ac, char*av[])
{
string keyboard = "`1234567890-=qwertyuiop[]\\asdfghjkl;'zxcvbnm,./";
string line;

getline(cin, line);

for (int i=0; i < line.length(); i++)
if(line[i] == ' ')
cout << " ";
else
cout << keyboard[keyboard.find_first_of(tolower(line[i])) - 2];

cout << endl;
return 0;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: