Caesars Cipher

So for my assignment, I have created two files, the plain text, and key.
What I need help on is figuring out where to insert the following :

offset = (KeyLetter - 'A') + 1
encryptedLetter = 'A' + (original distance from 'A' + offset) % 26
encryptedLetter = 'A' + (plainTextLetter - 'A' + offset) % 26


This is how my code is supposed to encrypt and decrypt. Where do I insert that information?? All my code does is just create the file, and read it. Also, how do I use both my plain text file and key file?

Im supposed to do something like this

Plaintext; Hello
Key: Kitty

and it is supposed to at H + K and then replace it with whatever letter its supposed to be. everything should be in caps
the actually ceasar shift is +3 to each char. are you streaming from file to file or from input string and hard coded string?
Topic archived. No new replies allowed.