Computer Science 1107
AN INTRODUCTION TO FORTRAN PROGRAMMING FOR SCIENTISTS AND ENGINEERS

Fall 2001

Programming Assignment 7
Due date: Monday, October 29, 2001



Objective: To explore writing FORTRAN 77 programs using functions.

A. Text Problem 18, Page 380.

  1. Create a hand-drawn flow chart for the program using the appropriately shaped boxes for start-stop, Input/Output, and computation as discussed in class. (No pseudocode option this time.)

  2. Write the FORTRAN program, naming the source code file lab7a.f and including an explicit list of all variables as well as a short description of the problem in a documentation section using comment lines at the beginning of the program. Be careful to choose the types of your variables appropriately and to include the names and student numbers of all authors in the documentation section.

  3. Run the program with sufficiently many carefully selected sets of input to demonstrate the correctness of your algorithm.

  4. Check your results before creating your script file.

B. Text Problem 19, page 381.

Use a function as was done in the Newton example.
  1. Create a hand-drawn flow chart for the program using the appropriately shaped boxes for start-stop, Input/Output, and computation as discussed in class OR write out the algorithm for the entire program using pseudocode which should be written out by hand, not typed.

  2. Write the FORTRAN program, naming the source code file lab7b.f and including an explicit list of all variables as well as a short description of the problem in a documentation section using comment lines at the beginning of the program. Be careful to choose the types of your variables appropriately and to include the names and student numbers of all authors in the documentation section.

  3. Check your results before creating your script file.

    Then hand in the following for each of your two programs:


Recall: For this and all programming assignments you should follow good software engineering principles including documenting your program with comments and using meaningful names for variables. Failure to do this will lead to reduced credit.

For this and subsequent assignments, you have the option of working in teams of two people. In this case, turn in one copy of your results with both names and student numbers included on every page of every item submitted.



Course Policies Tentative Schedule Help and References
Assignments Grades and Announcements Home