-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathBoolean15.java
More file actions
20 lines (18 loc) · 585 Bytes
/
Boolean15.java
File metadata and controls
20 lines (18 loc) · 585 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package booleans;
import java.util.Scanner;
public class Boolean15 {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int a,b,c;
boolean d;
System.out.print("A = ");
a=scanner.nextInt();
System.out.print("B = ");
b=scanner.nextInt();
System.out.print("C = ");
c=scanner.nextInt();
d =(a>=0 && b>=0 && c<0)||(a<0 && b>=0 && c>=0)||(a>=0 && b<0 && c>=0);
// (-)||(-)||(-)
System.out.println(d);
}
}