Homework #3, Using Assignment Statements

(10 points)

In each of the following problems you will be provided with a sample program, that is missing a key calculation. Study the variable names that are provided as input or otherwise defined, look at the name of the variable or variables that are output, then find a pair of lines that look like this:

c----------------------------------------------------------------

c----------------------------------------------------------------
Insert an assignment statement or statements between these lines, that will produce the correct results. In addition locate the "Modified by:" comment line and add your name and the date to the end of the line.

  1. The program tconvert.f reads a temperature in Fahrenheit and outputs the equivalent temperature in Kelvin. Assume 32.0F = 273.16K.
  2. The program fall.f calculates the distance that a dropped ball falls (in meters) in a given number of seconds. It assumes: 1) no air friction; 2) gravitational constant of 9.807 m/s21 ; and 3) the body starts with zero velocity.
  3. The program hypot.f calculates the hypotenuse of a Right Triangle given the lengths of the other two sides.
  4. The program sphere.f calculates the volume and surface area of a sphere given its radius.
Leave your modified version of each of these files (don't change the file name) in your "homework" subdirectory. We will pick them up after the due date and test them.

Homework List / Home


Maintained by John Mahaffy : jhm@psu.edu