0

After battling Caesar for 2 days I think I'm close but am stuck on why I keep getting double code. This is what I get with ./caesar 3 then typing in

Oh boy!

RRkQ eKrXbH!

So its getting there, but I can't figure out why the double talk. I suspect its a combination of how I'm getting the key, a loop issue and maybe too many printf statements, but I've been going in circles and would love a nudge in the correct direction. I'm not currently posting a snippet of code with this as I'm not sure where the issue(s) is exactly. Any help appreciated!

3
  • I would check my loop continuation condition make sure it's not true when it shouldn't be.
    – kzidane
    Mar 27, 2015 at 23:56
  • I think I understand what you are saying, but after several more bouts with Caesar I am no closer to a solution. This is pseudo code of the loop section.
    – H R
    Apr 1, 2015 at 1:21
  • for // to check through the loop, one i at a time { if // to check if a letter { if // to check if its lowercase and ascii math and print result if // to check if its uppercase and ascii math and print result } else // if its not a letter and print result }
    – H R
    Apr 1, 2015 at 1:29

1 Answer 1

0

Caesar solved! Getting rid of the isalpha check, and changing all the printf statements into a single one at the end with %s instead of %c made the loop behave and not double code. Thx!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .