repl.it
@AlexLovelock/

boolean n gates

Java

No description

fork
loading
Files
  • Main.java
  • jdt.ls-java-project
Main.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import java.util.Scanner;
class Main {
  public static void main(String[] args) {
   
    Scanner input = new  Scanner(System.in);

    System.out.println("Is A True, or False?");
    boolean a = Boolean.ParseBoolean(input.nextLine());

    System.out.println("Is B True or False?");
    boolean b = Boolean.ParseBoolean(input.nextLine());

    System.out.println(!((a||b)&&(a^b)));

  }
}