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

Fall 2001

Programming Assignment 11
Due date: Friday, November 30, 2001



Objective: To explore writing a FORTRAN 77 program using multi-dimenstional arrays.

Do Text Problem 7, Page 615.

In this problem, you will create what is called a "Magic Square."

Be sure to do the following:

  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 lab11.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. Display your output using so that it looks like a magic square by using formatted output.

  4. Be sure to test for correct input from the user.

  5. Run the program with n = 3, 5, 7, and 9.

  6. Check your results before creating your script file.

Then hand in the following: NO required paragraph this time!.


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 programming 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