You will be given three integer inputs x, y, z. You have to find the sum of these inputs. Print true if the sum is less than 150 and false otherwise.
Input Format
For each test case, In the first line, you will be given the value of x. In the second line, you will be given the value of y. In the third line, you will be given the value of z.
Constraints
-2^31 <= x, y ,z <= 2^31-1
Output Format
true or false accordingly
Sample Input 0
20
30
50
Sample Output 0
true
Explanation 0
Sum of 20, 30, 50 is 100, since the sum is less than 150 so we print true.
import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;
public class Solution {
public static void main(String[] args) {
Scanner Scan=new Scanner (System.in);
int x=Scan.nextInt();
int y=Scan.nextInt();
int z=Scan.nextInt();
int sum=x+y+z;
boolean sum [lessThan] 100;
}
}


0 Comments