Advertisement
Guest User

Untitled

a guest
Feb 21st, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.83 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3.  
  4.  
  5. char method(char x){
  6.  
  7. string y="\'d";
  8.  
  9. if(x=='/') return '.';
  10. if(x==' ') return ' ';
  11. else if(x=='.') return ',';
  12. else if(x==',') return 'M';
  13. else if(x=='M') return 'N';
  14. else if(x=='N') return 'B';
  15. else if(x=='B') return 'V';
  16. else if(x=='V') return 'C';
  17. else if(x=='C') return 'X';
  18. else if(x=='X') return 'Z';
  19.  
  20.  
  21. else if(x==y[1]) return ';';
  22. else if(x==';') return 'L';
  23. else if(x=='L') return 'K';
  24. else if(x=='K') return 'J';
  25. else if(x=='J') return 'H';
  26. else if(x=='H') return 'G';
  27. else if(x=='G') return 'F';
  28. else if(x=='F') return 'D';
  29. else if(x=='D') return 'S';
  30. else if(x=='S') return 'A';
  31.  
  32. else if(x==y[0]) return ''; ///y[0]='\' ;
  33. else if(x==']') return '[';
  34. else if(x=='[') return 'P';
  35. else if(x=='P') return 'O';
  36. else if(x=='O') return 'I';
  37. else if(x=='I') return 'U';
  38. else if(x=='U') return 'Y';
  39. else if(x=='Y') return 'T';
  40. else if(x=='T') return 'R';
  41. else if(x=='R') return 'E';
  42. else if(x=='E') return 'W';
  43. else if(x=='W') return 'Q';
  44.  
  45.  
  46. else if(x=='=') return '-';
  47. else if(x=='-') return '0';
  48. else if(x=='0') return '9';
  49. else if(x=='9') return '8';
  50. else if(x=='8') return '7';
  51. else if(x=='7') return '6';
  52. else if(x=='6') return '5';
  53. else if(x=='5') return '4';
  54. else if(x=='4') return '3';
  55. else if(x=='3') return '2';
  56. else if(x=='2') return '1';
  57. else if(x=='1') return '`';
  58.  
  59.  
  60.  
  61. }
  62.  
  63.  
  64.  
  65.  
  66. int main(){
  67.  
  68. long long len;
  69. string myString;
  70.  
  71. while(getline(cin,myString)){
  72. len=myString.length();
  73.  
  74.  
  75. for(long long i=0;i<len;i++){
  76. myString[i]=method(myString[i]);
  77. cout<<myString[i];
  78. }
  79.  
  80. }
  81.  
  82. return 0;
  83. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement