Facebook
From lomba, 2 Months ago, written in C++.
This paste is a reply to ttt from itu - go back
Embed
Viewing differences between ttt and Re: ttt
#include<bits/stdc++.h>

#include

using namespace std;
std;

int main(){
main()
{
    
char a[26];
cout<<"Enter 
lw_ar[26]= {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};
    char up_ar[26]= {'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'};
    cout<<"Enter 
your plain encrypted text : ";
";
    
string s;
cin>>s;
cout<<"Enter the value of 
s;
    cin>>s;
    cout<<"Enter your 
key : ";
";
    
int key; cin>>key;
cout<<key<<endl;
cout<<"The ciphered text is : ";
key;
    cin>>key;
    string decyrp="";
    
for(int i=0;i<s.length();i++) cout<
i=0;i         if(s[i]>='a')
        {
        int tmp=((s[i]-'a')-key+26)&;
        decyrp+=lw_ar[tmp];
        }
        else{
        int tmp=((s[i]-'A')-key+26)&;
        decyrp+=up_ar[tmp];
        }
    }
    cout<<"Your decrypted cipher is : "<
}