/* Author: Francesco Taurisano This algorithm uses the Caesar's cipher method to decrypt a ciphertext file and create a plaintex file. The secret key is read from the keyboard. */ #include #include using namespace std; int main() { char letter; int key; cout<<"Insert the secret key "; cin>>key; ifstream ciphertext("c:/file2.txt"); ofstream plaintext("c:/file3.txt"); while(ciphertext.get(letter)) { plaintext.put(letter-key); } ciphertext.close(); plaintext.close(); system("pause"); return 0; }