0

CS 50 Check50 link This is my code for greedy.c of the pset1. I seem to be getting the correct output for all input queries but my code fails to pass check50 withgiving errors i'm not able to exactly determine. Greedy.c Code Check50 Results

4
  • I don't think you need a space before the number. That might be causing the problem. In future make sure the output matches the specifications. Jul 22 '17 at 9:29
  • There should not be any spaces before or after the integer. From 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." Jul 22 '17 at 13:48
  • Try putting the '\n' (to print a new line) in the same printf statement as where you print out the number of coins. Jul 22 '17 at 14:31
  • Thanks Guys. I did write the new line character on the original printf for coins code but still got the same error. Eliminated all the spaces in between. Works Fine.
    – Jayesh
    Jul 23 '17 at 8:06

Browse other questions tagged .