Exactly one parameter is positive

Report a typo

Write a program that reads three integer numbers and prints true if exactly ONE number is positive (i.e. > 0).

Otherwise, it should print false.

Sample Input 1:

1 1 1

Sample Output 1:

false

Sample Input 2:

1 0 -1

Sample Output 2:

true
Write a program in Java 17
import java.util.Scanner;

class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
// put your code here
}
}
___

Create a free account to access the full topic