Write a1 1 2 2 ....5....0....5....0....5 4 T .TR .TRUE. Franco February Truman .FALSE. fake

We use1 1 2 2 3 3 4 4 ....5....0....5....0....5....0....5....0....5 Truth Table ----------- P Q P | Q P & Q P ^ Q P = Q ----- ----- ----- ----- ----- ----- T T T T F T T F T F T F F T T F T F F F F F F T

ClickPROGRAM Logical_Input IMPLICIT NONE LOGICAL :: P, Q INTEGER :: i, Number WRITE(*,"(A, A)") " ", " Truth Table" WRITE(*,"(A, A)") " ", " -----------" WRITE(*,*) WRITE(*,"(A,A)") " ", " P Q P | Q P & Q P ^ Q P = Q" WRITE(*,"(A,6A)") " ", (" -----", i = 1, 6) READ(*,"(I5)") Number DO i = 1, Number READ(*,"(2L10)") P, Q WRITE(*,"(A, 6L7)") " ", P, Q, & P .OR. Q, P .AND. Q, P .NEQV. Q, P .EQV. Q END DO END PROGRAM Logical_Input

1 1 2 2 3 3 4 4 ....5....0....5....0....5....0....5....0....5 Truth Table ----------- P Q P | Q P & Q P ^ Q P = Q ----- ----- ----- ----- ----- ----- T T T T F T T F T F T F F T T F T F F F F F F T

- Since each input line has two
**LOGICAL**values each of which occupies 10 positions, the format is simply**(2L10)**. - For the output, we use six positions for each output value.
Since there are two spaces between two adjacent columns, we use
**6L7**to print the six**LOGICAL**values.