Programming Assignment #1 - FORTRAN
Write a FORTRAN program using the elements of the FORTRAN language discussed in class and in the FORTRAN information link. Use only those elements to solve the problem described below. I expect you to use FORMAT statements for prompts and for reading and writing data. I expect your code to use upper case letters except in output strings. I do not expect to see any ELSE statements or unnecessary type declarations. I do expect comments about the language. I’d like to see at least one SUBROUTINE and one FUNCTION. Arrays may be useful.
The input will consist of three (3) lines of 80 digits with no blank spaces, no commas and no decimal points. The data is to be read as real numbers. Each line of data is to be handled separately. The original data values read in from each line are to be echoed, averaged and sorted using any sort you like. The sorted data and the averages are also to be output. All output should be labeled. The original and sorted data should be output with four numbers per line. Use blank lines where appropriate to make output more readable.
The first line of input data represents fifteen (15) five-digit numbers with two of the digits after the decimal point. The second line of data represents ten (10) six-digit numbers with three of the digits after the decimal point. The third line of data represents five (5) ten-digit numbers with five of the digits after the decimal point.
We will discuss the use of an implied DO loop in class which may be helpful in reading and writing the values. Be sure to re-read the submission and heading instructions for programs.
This program must be submitted to Blackboard by midnight Wednesday, September 5th and your folders must be placed on my desk by the start of class on Thursday September 6th. NOTE: the work in the folder MUST correspond to what you submit.