Write a FORTRAN program using the elements of the FORTRAN language discussed in class and 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 on 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 first line of input data represents forty (40) two-digit numbers with one of the digits after the decimal point.   The second line of data represents twenty (20) four-digit numbers with two of the digits after the decimal point.  The third line of data represents sixteen (16) five-digit numbers with three 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 is due at the start of class on Tuesday, September 12th