0

I'm working on pset1 and getting some strange behavior when I use check50 to assess my greedy.c program. I have to correct outputs and as far as I can tell I'm using the same printing conventions discussed in lecture but the check50 utility is indicating that I'm doing something incorrect none the less. Any help would be greatly appreciated!

    }
    printf("%i \n", Coins);
}

check50 on greedy.c

[ Ed: full code drop removed to comply with Honor Code. Relevant code left. ]

3

Well, you're not exactly, precisely following the spec. Your program is really working correctly, but there's one minor problem. CHECK50 is looking for very exact responses. For instance, if you include, oh, let's say, an extra space in your output between the number of coins and the \n, it will choke on it.

If this solves your problem, please mark your question as answered. Let's keep up on forum maintenance. ;-)

2
  • Thanks Cliff but I replaced the printf statement with printf("%i", Coins); without the extraneous space and newline character and I'm running into the same problem. any thoughts? May 10 '15 at 0:34
  • Ignore the previous comment. Your help was appreciated! May 10 '15 at 0:41

You must log in to answer this question.

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