




Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





A. Select the best answer to each of the following concerning standard FORTRAN 77 and circle your choice.
output:
The elevations at various locations in a region may be stored in a grid (two-dimensional array) such as 5039 5127 523 8 5310 516 7 529 0 556 0 549 0 514 2 5021 4920 5229 538 4 5839 486 2 5023 513 4 5411 5476 5178
..... ..... ..... ..... A “peak” is identified as a location that has lower elevations all around--by which we mean directly above, directly below, directly to the right, and directly to the left. Thus in the above grid there are three peaks: row one,column 4; row two,column 2; and row three,column
Suppose the (4 digit) posting IDs and corresponding grades on project 5 in ENGI 1331 have been stored in a data file named GRDE.DAT, with one posting ID and corresponding grade per line. Suppose further that they have already been sorted so that they are in order of increasing posting ID. Write a complete FORTRAN program (omitting comments) that will read this information and produce a printed output showing the ID’s and grades in a tabular form such that there are four columns of output pairs. For example, if GRDE.DAT contained: 1204 85. 1215 95. 1220 60. 1345 40. 1391 100. 1442 75. 1533 30. 1574 80. 1614 90. 1843 63. Then the output should be: PID P5 PID P5 PID P5 PID P 1204 85. 1345 40. 1533 30. 1614 90. 1215 95. 1391 100. 1574 80. 1843 63. 1220 60. 1442 75.