Write an expression that will cause greater or equal to -10 toprint if the value of userNum
Fantastic news! We've Found the answer you've been seeking!
Question:
Write an expression that will cause "greater or equal to -10" toprint if the value of userNum is greater than or equal to -10.
import java.util.Scanner;
public class EqualityAndRelational {
public static void main (String [] args) {
int userNum;
Scanner scnr = newScanner(System.in);
userNum = scnr.nextInt(); // Programwill be tested with values: -9, -10, -11, -12.
if (//solution goeshere//) {
System.out.println("greater or equal to -10");
}
else {
System.out.println("less than -10");
}
}
}
Related Book For
Introduction To Probability And Statistics
ISBN: 9781133103752
14th Edition
Authors: William Mendenhall, Robert Beaver, Barbara Beaver
Posted Date: