Homework 3


40 pts., due Mar. 1

For each program, you should turn in the source code and a print-out showing a sample run (print the output window). Follow the guidelines in Section 3.7 for the style of your programs. In addition:

  1. Use descriptive names for variables and named constants. In addition, write a brief comment for each variable and named constant describing how it is used.
  2. Use uppercase characters for named constants with underscores to separate ``words.'' Use lowercase characters for variables with either underscores or capitalization to separate ``words.''
  3. If a formula you use in a statement isn't obvious, comment it. In general, comment any non-obvious statement or statement block.

Documentation will account for 30% of your grade.

  1. Problem 1 on pg. 144.
  2. Problem 2 on pg. 145. Use the pow function (pg. 135) to compute the exponential part of the formula. Note that this function is in the math.h library.

Thomas P. Kelliher
Thu Feb 22 21:43:43 EST 1996
Tom Kelliher