3

I have solved caesar, but check50 is not recognizing my results as correct.

:) caesar.c exists
:) caesar.c compiles
:( encrypts "a" as "b" using 1 as key
   \ expected output, but not "b"
:( encrypts "barfoo" as "yxocll" using 23 as key
   \ expected output, but not "yxocll"
:( encrypts "BARFOO" as "EDUIRR" using 3 as key
   \ expected output, but not "EDUIRR"
:( encrypts "BaRFoo" as "FeVJss" using 4 as key
   \ expected output, but not "FeVJss"
:( encrypts "barfoo" as "onesbb" using 65 as key
   \ expected output, but not "onesbb"
:( encrypts "world, say hello!" as "iadxp, emk tqxxa!" using 12 as key
   \ expected output, but not "iadxp, emk tqxxa!"
:) handles lack of argv[1]
https://sandbox.cs50.net/checks/566a750144fe48f99f7b6734e0e06175

Is this because I am not outputting a new line after the encrypted text? How do I do that?

1 Answer 1

3

You just need to add the return code "\n" at the end, the same way you added the rest of the characters.

4
  • Thanks. Should \n be added for all psets that answer by printf function?
    – maq
    Dec 11, 2014 at 17:49
  • In this psets, every line must end in \n in order to pass the check.
    – supeindesu
    Dec 14, 2014 at 14:52
  • i used "\n" still the error continues,?
    – Kavya gy
    Mar 8, 2017 at 13:59
  • Hey, I have added "\n" at the end of each line, but it still doesn't pass check50. Jun 2, 2017 at 16:50

You must log in to answer this question.

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