C Programmer: E Adams
C Course: CS 430
C Date: 9/1/04
C Language: FORTRAN
C Compiler: FORTRAN (on Raven)
C Environment: VAX VMS
C Source Filename: Assignment1.for
C Executable Filename: Assignment1.exe
C PURPOSE: To find the area of multiple trapezoids given the lengths
C of the parallel sides and the height of each
C INPUT: Multiple sets of 3 numbers at a time (on a line).
C Numbers represent the lengths of the 2 parallel sides of a
C trapezoid and its height
C Zeroes will signal end of data
C Numbers are assumed to be positive
C No error checking is performed
C OUTPUT: For each trapezoid: base1, base2, height, area
C234567
53 WRITE (6, 22)
WRITE (6, 2)
WRITE (6, 100)
WRITE (6, 32)
READ (5, 55) A,B,H
IF (A .EQ. 0.0) STOP
AREA = .5 * (A + B) * H
WRITE (6, 124)
WRITE (6, 102) A,B,H,AREA
GO TO 53
124 FORMAT (1X, ' SIDE A SIDE B HEIGHT AREA ')
2 FORMAT (1X, ' YOUR NUMBERS SHOULD EACH OCCUPY 10 COLUMNS')
22 FORMAT (1X, ' PLEASE ENTER THREE REAL NUMBERS ON A SINGLE LINE')
32 FORMAT (1X, ' ENTER 0.0 TO QUIT ')
55 FORMAT (F10.2, F10.2, F10.2)
102 FORMAT (1X, F12.2, F12.2, F12.2, F12.2)
100 FORMAT (1X, ' THEY SHOULD BE RIGHT JUSTIFIED IN THE COLUMNS')
END