The check50 displays
jharvard@appliance (~/Dropbox/pset1): check50 2014/x/pset1/greedy greedy.c
:) greedy.c exists
:) greedy.c compiles
:) input of 0.41 yields output of 4
:) input of 0.01 yields output of 1
:) input of 0.15 yields output of 2
:) input of 1.6 yields output of 7
:) input of 23 yields output of 92
:( input of 4.2 yields output of 18
\ expected output, but not "22\n"
:) rejects a negative input like -.1
:) rejects a non-numeric input of "foo"
:) rejects a non-numeric input of ""
I understand that this
:( input of 4.2 yields output of 18
\ expected output, but not "22\n"
is causing the error.
But if 4.2 is considered as 4.20 then 22 is the correct answer and 18 is correct if it is considered as 4.02.
Then again in the previous check 1.6 is considered as 1.60.
So, 22 should have been considered correct???