ECS 30 A Homework #4 Winter 2011 Due: Feb 4, 11:59pm using handin to cs30a hw4 directory. Filenames: see below. Oracles available shortly. All programs should be able to compile with no warnings when compiled with the –Wall option. You should put your name(s) in a comment on the first line of each file. The prompts, and output format of each program must match the oracle exactly. NOTE: Unfortunately, there appears to be some differences between 5th and 6th Ed. of the book. I'm using the 6th ed. If you have the 5th Ed (or no text book) I believe you can get a good look at the book at the Library, where it should be on reserve. Let me know if it's not. #2, page 216 Filename: bmi.c. Body-mass index. Input is a float. #6 page 217, Filename: whereami.c. Inputs are floats. #7 page 218, Filename doy.c Inputs are 3 integers (says so in the problem defn). Challenge: Try and do it without if statements, and without re-writing code for adding up the days of the month. Generate an error if the month is > 12. Ignore other errors.
This is the end of the preview. Sign up
access the rest of the document.