            NUM = 33

            WRITE (6, 10)
  10        FORMAT (1X, ' Guess the number game ')

            WRITE (6, 11)
  11        FORMAT (1X, ' Guess a number between 1 and 100: ')
  
  23        READ (5,12,ERR = 29) I
  12        FORMAT (I4)
  
            IF(I.LT.NUM)GO TO 20
            IF(I.GT.NUM)GO TO 21
            IF(I.EQ.NUM)GO TO 22

  20        WRITE (6, 15)
  15        FORMAT (1X, ' Guess higher: ')
            GO TO  23
            
  21        WRITE (6, 13)
  13        FORMAT (1X, ' Guess lower: ')
            GO TO  23
            
  22        WRITE (6, 14)
  14        FORMAT (1X, ' You guessed the number! ')
            GO TO 28
            
  29        WRITE (6, 16)
  16        FORMAT (1X, ' HAD AN ERROR IN THE INPUT DATA ')
  
  28        STOP
            END
