Check the sum

Report a typo

Write a program that reads three integer numbers. Check if any two numbers can be added to give a value of exactly 20. Output true if the sum of any two numbers is 20, otherwise print 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