Quick actions

cmd+k|ctrl+k

Navigation

Languages

MarcusMock2MCQ9

Snippet info

Language

Java

Visibility

public

Author

masterhun

Created

2024-05-06T00:14:15.108252Z

Updated

2024-05-06T00:24:31.933009Z

public class Main {
    
    
    public static void main(String[] args) {
        
        // Harbor, Week 2, Mock 2, PR_PracticeTest_2.pdf
        
        // AP CS A 
        
        // MCQ 9
        boolean a = false;
        boolean b = true;
        boolean c = false;
        System.out.println("Choice A");
        System.out.println((a && b && !c) || (a && !b && c) || (!a && b && c));
        System.out.println("Choice B");
        System.out.println((a && b && !c) && (a && !b && c) && (!a && b && c));
        System.out.println("Choice C");
        System.out.println((a || b || !c) && (a || !b || c) && (!a || b || c));
        System.out.println("Choice D");
        System.out.println((a && b) || (a && c) || (b && c));
        System.out.println("Choice E");
        System.out.println((a || b) && (a || c) && (b || c));
  
        // Output: 5 
    
        
    }
}
INFO