This is a caesar encryption code, please help me with a code to reverse this operation (decrept it)in C++
string encrypt(string text, int s){ string result = "";
// traverse text for (int i=0;i<> { // apply transformation to each character // Encrypt Uppercase letters if (isupper(text[i])) result += char(int(text[i]+s-65)%26 +65);
// Encrypt Lowercase letters else result += char(int(text[i]+s-97)%26 +97); }
// Return the resulting string return result;}
int main(){ string text; int s; cin>> text; cin >> s; cout < "text="" :="" "=""><> cout < "\nshift:="" "=""><> cout < "\ncipher:="" "="">< encrypt(text,=""> return 0;}
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here