fork download
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4.  
  5. int main() {
  6. string x;
  7. string y="`1234567890-=QWERTYUIOP[]\ASDFGHJKL;'ZXCVBNM,./";
  8. while(getline(cin,x))
  9. {
  10. size_t found;
  11. for (int i=0; i<x.length(); i++)
  12. {
  13. if (x[i]==' ')
  14. {
  15. cout<<" ";
  16. }
  17.  
  18. else
  19. {
  20. found=y.find_first_of(x[i]);
  21. cout<<y[found-1];
  22. }
  23. }
  24. cout<<endl;
  25. }
  26. return 0;
  27. }
  28.  
Success #stdin #stdout 0s 3468KB
stdin
OY OD S MOVR MOHJY GPT VPFOMH
stdout
IT IS A NICE NIGHT FOR CODING