The output is right, but check50 says that it is wrong]1
[removed code per academic honesty guidelines]
CS50 Stack Exchange is a question and answer site for students of Harvard University's CS50. It only takes a minute to sign up.
Sign up to join this communityYou've certainly taken a novel approach to adding your key to your plaintext!
The issue you are having is that you are checking that you've gone past 'z' or 'Z' before you actually increment the char.
If you run ./caesar 1
and then plaintext of "zZ" you'll see what I mean.
Increment your char first before testing it.