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
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");
}
}
}
Step by Step Solution
3.38 Rating (148 Votes )
There are 3 Steps involved in it
Step: 1
EqualityAndRelationaljava Java program to input an integer and di...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get StartedRecommended Textbook for
Introduction To Probability And Statistics
Authors: William Mendenhall, Robert Beaver, Barbara Beaver
14th Edition
1133103758, 978-1133103752
Students also viewed these Electrical Engineering questions
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
View Answer in SolutionInn App