Advertisement
Guest User

Untitled

a guest
Aug 11th, 2021
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. #define your using
  3. #define mom namespace std;
  4.  
  5. your mom;
  6. int main()
  7. {
  8. string s="qwertyuiopasdfghjkl;zxcvbnm,./";
  9. char never_gonna_give_you_up;
  10. cin >> never_gonna_give_you_up;
  11. string penaldo;
  12. cin >> penaldo;
  13. if(never_gonna_give_you_up=='R')
  14. {
  15. for(int i=0;i<penaldo.size();i++)
  16. {
  17. for(int j=0;j<s.size();j++)
  18. {
  19. if(s[j]==penaldo[i])
  20. {
  21. penaldo[i]=s[j-1];
  22. }
  23. }
  24. }
  25. }
  26. if(never_gonna_give_you_up=='L')
  27. {
  28. for(int i=0;i<penaldo.size();i++)
  29. {
  30. for(int j=0;j<s.size();j++)
  31. {
  32. if(s[j]==penaldo[i])
  33. {
  34. penaldo[i]=s[j+1];
  35. }
  36. }
  37. }
  38. }
  39. cout << penaldo;
  40.  
  41. return 0;
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement