Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction To Probability And Statistics

Authors: William Mendenhall, Robert Beaver, Barbara Beaver

14th Edition

1133103758, 978-1133103752

More Books

Students also viewed these Electrical Engineering questions

Question

=+d) How many treatments are involved?

Answered: 1 week ago

Question

What is the specific purpose of an acceptable use policy?

Answered: 1 week ago