Advertisement
a53

ROT13

a53
Nov 25th, 2018
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. char c;
  7. while(cin.get(c)&&c!='\n')
  8. {
  9. if(c==' ')
  10. cout<<' ';
  11. if((c>='a'&&c<='m')||(c>='A'&&c<='M'))
  12. cout<<(char)(c+13);
  13. if((c>='n'&&c<='z')||(c>='N'&&c<='Z'))
  14. cout<<(char)(c-13);
  15. }
  16. return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement