I am busy with CS50 pset2. I am trying to interpret the error message received:

:( encrypts "BaRFoo" as "FeVJss" using 4 as key \ expected output, but not "ciphertext: FeVJss"

My programme provides the expected results but seemingly not the correct format? However, it seems correct to me.

Any input would be appreciated.

Thanks, Alan

1 Answer 1


Is that the only test it fails, or just an example? It looks like it is missing the final "newline" as required by the spec:

After outputting ciphertext, you should print a newline. Your program should then exit by returning 0 from main.

Sometimes you can get more info on what check50 expects by opening the sandbox link and examining the individual test results.

  • It applied to all tests and the problem was the lack of a newline - thank you. I will investigate the sandbox link - was not aware of it.
    – ATBSA
    Mar 20, 2017 at 15:49

You must log in to answer this question.

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