Guest User

Untitled

a guest
Mar 4th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. #include<iostream>
  2. #include<cstring>
  3. #include<cctype>
  4. using namespace std;
  5.  
  6. int main() {
  7. char s, c[] = "`1234567890-=qwertyuiop[]\\asdfghjkl;'zxcvbnm,./";
  8. int len = strlen(c);
  9. while(cin.get(s)){
  10. bool v = false;
  11. for (int j = 0; j < len; j++){
  12. s = tolower(s);
  13. if (s == c[j])
  14. cout << c[j - 2], v = true;
  15. }
  16. if (!v)
  17. cout << s;
  18. }
  19. return 0;
  20. }
Add Comment
Please, Sign In to add comment