2

When I run check50 on pset1 it does not validate my solution, even if it says that the expected output is the same as the correct output.

Does anyone know what the problem is?

Output from check50

2
  • I have the same problem. All of my answers are correct, but I get the same output as above. My final line of code just prints the integer followed by \n. printf ("%d \n", answer); Commented Aug 13, 2014 at 6:47
  • Related: cs50.stackexchange.com/q/1526/1448
    – Air
    Commented Aug 14, 2014 at 23:16

1 Answer 1

3

Be sure you have put a new line at the end of your answer, so it matches the staff version exactly. As it says in the spec:

"Incidentally, so that we can automate some tests of your code, we ask that your program’s last line of output be only the minimum number of coins possible: an integer followed by \n. "

1
  • Thank you, I first had a version ending with \n, but had a space like the following %i \n, while it was supposed to be %i\n. Commented Aug 14, 2014 at 8:12

You must log in to answer this question.

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