      PROGRAM ANGLE1
***********************************************************************
* Program demonstrating the use of a subroutine subprogram PRNDEG to  *
* display an angle in degrees.  Variables used are:                   *
*     DEGS   : degrees in the angle measurement                       *
*     MINUTS : minutes in the angle measurement                       *
*     SECONS : seconds in the angle measurement                       *
*     RESPON : user response to more-data question                    *
*                                                                     *
* Input:  DEGS, MINUTS, SECONS, RESPON                                *
* Output: Equivalent measure in degrees (displayed by PRNDEG)         *
***********************************************************************

      INTEGER DEGS, MINUTS, SECONS, RESPON

* Read and convert angles until user signals no more data

10    CONTINUE
          PRINT *, 'ENTER DEGREES, MINUTES, AND SECONDS'
          READ *, DEGS, MINUTS, SECONS
          CALL PRNDEG(DEGS, MINUTS, SECONS)
          PRINT *
          PRINT *, 'MORE ANGLES (0 = NO, 1 = YES)'
          READ *, RESPON
      IF (RESPON .NE. 0) GO TO 10
      END

** PRNDEG *********************************************
* Subroutine to display a measurement of DEG degrees, *
* MIN minutes and SEC seconds as the equivalent       *
* degree measure.                                     *
* Accepts:  DEG, MIN, SEC                             *
* Output:   Values of DEG, MIN, and SEC and the       *
*           equivalent degree measure                 *
*******************************************************

      SUBROUTINE PRNDEG(DEG, MIN, SEC)

      INTEGER DEG, MIN, SEC

      PRINT *, DEG, ' DEGREES', MIN, ' MINUTES', 
     +         SEC, ' SECONDS'
      PRINT *, 'IS EQUIVALENT TO '
      PRINT *, DEG + REAL(MIN)/60.0 + REAL(SEC)/3600.0, 
     +               ' DEGREES'
      END

