Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- jharvard@appliance (~/Dropbox/pset1): make greedy1
- make: 'greedy1' is up to date.
- jharvard@appliance (~/Dropbox/pset1): ./greedy1
- Oh hai! How much change is owed?
- .15
- 2
- jharvard@appliance (~/Dropbox/pset1): ./greedy1
- Oh hai! How much change is owed?
- 1.6
- 7
- jharvard@appliance (~/Dropbox/pset1): ./greedy1
- Oh hai! How much change is owed?
- 23
- 92
- jharvard@appliance (~/Dropbox/pset1): ./greedy1
- Oh hai! How much change is owed?
- 4.2
- 18
- 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
- expected output, but not "32769n"
- :( input of 1.6 yields output of 7
- expected output, but not "32774n"
- :( input of 23 yields output of 92
- expected output, but not "32859n"
- :( input of 4.2 yields output of 18
- expected output, but not "22n"
- :) rejects a negative input like -1
- :) rejects a non-numeric input of "foo"
- :) rejects a non-numeric input of ""
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement