0

My code encrypts the messages correctly but fails check50. I've checked /n to make sure I have that, and am not printing anything unexpected. I don't want to copy all my code because it will give away the pset, but I'll paste the check50 report. I'd be happy to send my code privately.

jharvard@appliance (~/pset2): check50 2014/x/pset2/caesar caesar.c
:) caesar.c exists
:) caesar.c compiles
:( encrypts "a" as "b" using 1 as key
   \ expected prompt for input, not output of "Enter a string: \n"
:( encrypts "barfoo" as "yxocll" using 23 as key
   \ expected prompt for input, not output of "Enter a string: \n"
:( encrypts "BARFOO" as "EDUIRR" using 3 as key
   \ expected prompt for input, not output of "Enter a string: \n"
:( encrypts "BaRFoo" as "FeVJss" using 4 as key
   \ expected prompt for input, not output of "Enter a string: \n"
:( encrypts "barfoo" as "onesbb" using 65 as key
   \ expected prompt for input, not output of "Enter a string: \n"
:( encrypts "world, say hello!" as "iadxp, emk tqxxa!" using 12 as key
   \ expected prompt for input, not output of "Enter a string: \n"
:) handles lack of argv[1]
1

Get rid of the line in your code that printf's "Enter a String:" and it should make check50 happy. For this one, it just wants a blank input, with no prompt. I know that seems strange and not user friendly, but that's what it wants.

1
  • That solved it! Thank you!
    – Faith
    Nov 21 '14 at 19:42

You must log in to answer this question.

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