2019-09-11 15:31:45 C++

C++

Copy Copied! Full
#include <bits/stdc++.h> using namespace std; char rot13(char c){ return (char)((c -'A' + 13) % 26 + 'A'); } int main(void){ string s = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; for(int i=0;i<s.size();i++){ cout << rot13(s[i]); } cout << endl; for(int i=0;i<s.size();i++){ cout << rot13(rot13(s[i])); } cout << endl; }
RECOMMEND