FORTRAN assignment #2
assigned:
due: at start of class
Write a FORTRAN program which
·
describes itself to the user;
·
calls a subroutine (GET3) to obtain 3
numbers from the keyboard;
·
calls a subroutine (PRIN3) to print out 3 numbers;
·
calls another subroutine (SORT3) to
sort the numbers into descending
order.
·
Your SORT3 subroutine should call another
subroutine (SWAP2) to swap out of order numbers.
·
Finally your program should call PRIN3
again to print out the numbers in descending order.
·
Do not print the numbers in the sort or swap
subroutines.
·
The data should be integer data all 3 integers
should be on the same line.
·
Use
I5 for the input format.
·
Your data does not have to be a 5-digit
integer but you should expect each data item to be right justified in a
5-column field (what happens if it isn’t?).
Deliverables:
Programmer: Elizabeth Adams
Course: CS 430 FALL 2004
Date:
Language: FORTRAN (using only features present in early FORTRAN)
Compiler: Lahey FORTRAN 95
Environmment: Windows NT
Source Filename: EndErr.FOR
Executable Filename: EndErr.exe
Purpose of program
Program input
Program output