Difference between revisions of "F90: Tabela verdade do OU"

From AdonaiMedrado.Pro.Br
Jump to: navigation, search
(New page: <code lang="fortran"> PROGRAM aula LOGICAL :: l1, l2 l1=.TRUE. l2=.TRUE. WRITE (*,*) "T e T =", l1 .OR. l2 WRITE (*,*) "T e F =", l1 .OR. .NOT. l2 WRITE (*,*) "F e T =", .NOT. l1 .O...)
 
 
Line 4: Line 4:
 
l1=.TRUE.
 
l1=.TRUE.
 
l2=.TRUE.
 
l2=.TRUE.
WRITE (*,*) "T e T =", l1 .OR. l2  
+
WRITE (*,*) "T ou T =", l1 .OR. l2  
WRITE (*,*) "T e F =", l1 .OR. .NOT. l2
+
WRITE (*,*) "T ou F =", l1 .OR. .NOT. l2
WRITE (*,*) "F e T =", .NOT. l1 .OR. l2
+
WRITE (*,*) "F ou T =", .NOT. l1 .OR. l2
WRITE (*,*) "F e F =", .NOT. l1 .OR. .NOT. l2
+
WRITE (*,*) "F ou F =", .NOT. l1 .OR. .NOT. l2
 
END PROGRAM aula
 
END PROGRAM aula
 
</code>
 
</code>

Latest revision as of 02:44, 3 November 2008

PROGRAM aula
	LOGICAL :: l1, l2
	l1=.TRUE.
	l2=.TRUE.
	WRITE (*,*) "T ou T =", l1 .OR. l2 
	WRITE (*,*) "T ou F =", l1 .OR. .NOT. l2
	WRITE (*,*) "F ou T =", .NOT. l1 .OR. l2
	WRITE (*,*) "F ou F =", .NOT. l1 .OR. .NOT. l2
END PROGRAM aula