Computer Science
1107
AN INTRODUCTION
TO FORTRAN
PROGRAMMING
FOR SCIENTISTS AND
ENGINEERS
Fall 2001
Objective:
To explore writing FORTRAN 77 programs using formatted input and
output.
2001 | 2001 | ||
+ 1234 | - 1234 | ||
3235 | 767 |
At the end of each month, a report is produced that shows the status of
each user's account in the file Users.dat. This file is formatted in the
following way:
Columns 1-15: User's last name
Columns 16-30: User's first name
Columns 31-35: User-ID
Columns 36-40: Password
Column 41: Space
Columns 42-44: Resource limit (in dollars)
Columns 45-49: Resources used to date (in
pennies)
Write a FORTRAN program to accept the current date from the user at the keyboard and to produce an output report on the screen as below in which the astericks (***) indicate that the user has already used 90% of more of the resources available to him or her that month.
Your output should be formatted and should look something like:
User Accounts -- 9/31/2001 | ||
Resource | Resources | |
User-ID | Limit | Used |
| ||
10101 | $750 | $380.81 |
10102 | $650 | $598.84*** |
. | ||
. | ||
. |
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 |