0

I have just finished my Greedy.c program with no errors in the program. However when I did the test (check50 2014. fall . pset1 . greedy greedy.c) it said that all of my outputs were wrong. This puzzled me because when I plugged in a number such as .41 into the program the output is 4, which is correct. So I was just wondering if my program is at fault or not.

Thanks!

Here is a screenshot of the problem https://i.sstatic.net/iEOnf.png

1
  • you have an extra slash before the newline character in the output!
    – kzidane
    Commented Jun 23, 2015 at 20:30

1 Answer 1

2

In the one at the top, you have an extra backslash () In the one at the bottom, you don't have the newline character. (\n) Check50 expects the newline character, and will take points off if you don't do exactly as it expects.

You must log in to answer this question.

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