作业帮 > 综合 > 作业

刚学编程,1、 设X,Y,Z的值分别是FALSE,TRUE,FLASE.写出下列逻辑表达式的值:not x and no

来源:学生作业帮 编辑:百度作业网作业帮 分类:综合作业 时间:2024/04/29 05:25:30
刚学编程,
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 no
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