#include<iostream> #include<string.h> using namespace std; int main(){ string s; cout<<"Enter the Cipher text: "; cin>>s; int n = s.size(); int k[n]; for(int i=0;i<n;i++){ k[i]=s[i]; } int kept; for(int i=1;i<=26;i++){ for(int m=0;m<n;m++){ kept = k[m]; kept = kept-i; cout<<char(kept); } cout<<endl; } return 0; }
Note :
- Don’t use space (” “) while giving input for the cipher text.
- The output would be a list of 26 decrypted text. Find out the required plain text by looking at each text in one go.
Comments
Loading…
Loading…