Check the sum

Report a typo

Write a program that reads the numbers a, b, c and checks if there's a pair of them that adds up to exactly 20.

The program must output true or false.

Sample Input 1:

1 2 3

Sample Output 1:

false

Sample Input 2:

4 16 7

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