      program program13
C
C  illustration of logical type
C
C  CWJ SDSU 2/3/2005
C

      implicit none

      integer i,j

      logical flag

      print*,' enter two integers '
      read*,i,j
      if(  (i.lt.0 .or. j.lt.0 ) 
     & .and. .not.(i.lt.0 .and. j.lt.0))then
         flag=.true.
      else
         flag=.false.
      endif

      if(flag)then
        print*,' one but not both is negative '
      endif

      end

