You are working for a defense contractor as a programmer and have been asked to write a function for use in several battlefield simulation programs. The real valued function must be named "dist" and must take two real arguments. The first argument is the angle of inclination of a cannon's barrel from horizontal, in radians. The second argument is the cannon's muzzle velocity in meters per second. The value returned by the function is the range of the cannon shell (in meters) subject to the following assumptions:
I have provided a driver program cannon.f to test your function. It reads the inclination angle in degrees, because it's easy to predict behavior for a shot straight up (90 degrees) or at 45 degrees (range about 9177 m). Add your function at the end of cannon.f, then compile and test the program.
This homework will be graded as follows:
Leave your modified version of cannon.f (don't change the file name) in your "homework" subdirectory. We will pick it up after the due date and test it.
Maintained by John Mahaffy : jhm@psu.edu