刚学编程,1、 设X,Y,Z的值分别是FALSE,TRUE,FLASE.写出下列逻辑表达式的值:not x and not y;true and x or y;(x and z) or (z and y);x or z and y;(4>5) and (79) or ( 9
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/15 16:47:49
刚学编程,1、 设X,Y,Z的值分别是FALSE,TRUE,FLASE.写出下列逻辑表达式的值:not x and not y;true and x or y;(x and z) or (z and y);x or z and y;(4>5) and (79) or ( 9
刚学编程,
1、 设X,Y,Z的值分别是FALSE,TRUE,FLASE.写出下列逻辑表达式的值:
not x and not y;
true and x or y;
(x and z) or (z and y);
x or z and y;
(4>5) and (79) or ( 9
刚学编程,1、 设X,Y,Z的值分别是FALSE,TRUE,FLASE.写出下列逻辑表达式的值:not x and not y;true and x or y;(x and z) or (z and y);x or z and y;(4>5) and (79) or ( 9
public class TestLogic {
public static void main(String[]args)
{
boolean x=false;
boolean y=true;
boolean z=false;
System.out.println(!(x&&y));
System.out.println(true && (x||y) );
System.out.println( (x&&z) || (y&&z) );
System.out.println(x||z&&y);
System.out.println((4>5) && (79)||(9