Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- //CAESAR CIPHER
- int main(){
- string s;
- cin>>s;
- int d;
- for(int i=0;i<s.length();i++){
- if(s[i]>=65&&s[i]<=90)
- d=90;
- else
- d=122;
- s[i]+=3;
- if(s[i]>d)
- s[i]-=26;
- }
- cout<<s;
- return 0;
- }
Add Comment
Please, Sign In to add comment