sábado, 1 de junio de 2013

deber 2

1._(a > 5) and (b < a)          si: a=5  b=15
0 and 0
0
2._(a > c) and (c < b)          si: a=30  b=20  c=15
1 and 1
1
3._((a < b) and (b = c)) and (c > d )         si: a=5  b=10  c=15  d=20
(1 and 0) and 1
0 and 1
0
4._(a > 5) or (b < a)          si: a=5  b=15
0 or 0
0
5._(a > c) or (c < b)          si: a=30  b=20  c=15
0 or 0
0
6._((a < b) or (b > c)) or (c < d)        si: a=30  b=20  c=15
(1 or 0) or 1
1 or 1
1
7._not (b > 0)         si:  b=15
not 1
¬1
0
8._not (a mod b <> 0)         si:  a=30  b=2
not 0 <> 0
9._not (a + b > c -d)         si:  a=5  b=10  c=20  d=15
not 1
¬1
0

No hay comentarios:

Publicar un comentario