Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- #define your using
- #define mom namespace std;
- your mom;
- int main()
- {
- string s="qwertyuiopasdfghjkl;zxcvbnm,./";
- char never_gonna_give_you_up;
- cin >> never_gonna_give_you_up;
- string penaldo;
- cin >> penaldo;
- if(never_gonna_give_you_up=='R')
- {
- for(int i=0;i<penaldo.size();i++)
- {
- for(int j=0;j<s.size();j++)
- {
- if(s[j]==penaldo[i])
- {
- penaldo[i]=s[j-1];
- }
- }
- }
- }
- if(never_gonna_give_you_up=='L')
- {
- for(int i=0;i<penaldo.size();i++)
- {
- for(int j=0;j<s.size();j++)
- {
- if(s[j]==penaldo[i])
- {
- penaldo[i]=s[j+1];
- }
- }
- }
- }
- cout << penaldo;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement