Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ROT13 encoder && decrypter
- #include <bits/stdc++.h>
- using namespace std;
- int main()
- {
- string s;
- cin>>s;
- for (int i=0; i<s.length(); i++){
- s[i]=(s[i]==96+13)?((((s[i]-96)+13)%26)+96+26):((((s[i]-96)+13)%26)+96);
- }
- cout<<s;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement