0

I ran the check50 command on the terminal window for my program caesar pset2 but I am unable to understand the error message in red as follows :

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

If you read the specifications well, your code to get the text of the user should be:

    printf("plaintext: ");
    string s = get_string();
    printf("ciphertext: ");
    ......

Check that it matches your code, surely it will not be the same

3
  • I did change the prompt line for user input as "plaintext" and also "ciphertext" for output(I just had that part left as per the specifications ,sorry I didn't mention it before). But, even after changing that I am getting the same error messages. Plse help. – sk.76 Jun 11 '17 at 6:23
  • After editing I received error message, that I have also edited in the question above . Plse check and any suggestions then plse share. – sk.76 Jun 11 '17 at 6:45
  • The problem becomes difficult without seeing the code in this case you can publish your complete code – MARS Jun 11 '17 at 10:12
0

The key line is right here:

expected output, but not "Please enter a string of your choice :"

check50 is telling that it is expecting output but not that particular output.

I suggest going back to the pset specifications and making sure that what you print matches exactly with what is expected.

2
  • I did change that to "plaintext" as per the specifications but that again gives error massages that I have edited in my code in the question. Plse check and any suggestions are welcomed. – sk.76 Jun 11 '17 at 6:43
  • @sk.76 Post a segment of your code. Without seeing that at this point it's hard to judge how best to fix whatever problem is persisting. – Peter Jun 11 '17 at 16:38

You must log in to answer this question.

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