您的位置:首页 > 其它

poj 2538 WERTYU

2012-06-20 01:10 183 查看
#include <iostream>
#include <string>
using namespace std;

string str = "`1234567890-=QWERTYUIOP[]\\ASDFGHJKL;'ZXCVBNM,./";

int main()
{
string s;
int i, len, j;
while (getline(cin, s)){
len = s.length();
for (i = 0; i < len; i++){
if (s[i] == ' ')
cout << s[i];
else{
for (j = 0; j < str.length(); j++)
if (s[i] == str[j]){
cout << str[j-1];
break;
}
}
}
cout << endl;
}
system("pause");
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: