Ceasar's Cipher

hey guys, Im running an encryption program! Everything runs fine, it encrypts as I would like it to. Unfortunately I need an expression which will allow me to decode it. I've tried and tried again but I just dont seem to be able to figure it out. This is what I have as the equation

 
char input_character = ((input_character - 'A' + k)%26) + 'A'


This is what I used to encrypt the text. How would I be able decrypt the text if the cypher key, 'k' were equal to 5?
try this
1
2
	
char input_character = ((input_character - 'A' + 26 - k)%26) + 'A'
thank you so much. I don't know you, but I'm pretty sure I love you.
Topic archived. No new replies allowed.