0

I am having issues with printf in Caesar Pset 2, as can be seen through how the program is being executed in the terminal window. I have highlighted in the screenshot where I believe the problem lies.

  1. How do I get the program to properly print a set string then the character (i.e "ciphertext: ___"?

  2. I am having trouble figuring out where to place \n in order to print a new line after the full ciphertext rather than every character, but every time I try I run into errors such as "expected )" here or there despite double checking my brackets. i.e I want to print bcd, not b c d .

Help would be highly appreciated. Thank you so much!

enter image description here

0

Well, it seems that your problem is that the code is printing "ciphertext" before every letter. What if you only print ciphertext once, by itself, and then print the letters separately?

That should be enough of a clue. ;-) By the way. What happens when a non-alpha is in the plain text? Does it print?

If this answers your question, please click on the check mark to accept. Let's keep up on forum maintenance. ;-)

1
  • Thank you for the help and the tip! I got it :) Jun 25 '18 at 1:39

You must log in to answer this question.

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