Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

finish the code: Given integers numInput 1 and numInput 2 , output numInput 1 is positive. if numInput 1 is greater than 0 . End

finish the code: Given integers numInput1 and numInput2, output "numInput1 is positive." if numInput1 is greater than 0. End with a newline.
Assign numInput2 with 9 if numInput2 is greater than 40. Otherwise, output "numInput2 is less than or equal to 40."
Ex: If the input is 65-20, then the output is:
numInput1 is positive.
numInput2 is less than or equal to 40.
numInput2 is -20. import java.util.Scanner;
public class NumberComparisons {
public static void main (String[] args){
Scanner scnr = new Scanner(System.in);
int numInput1;
int numInput2;
numInput1= scnr.nextInt();
numInput2= scnr.nextInt();

Step by Step Solution

There are 3 Steps involved in it

Step: 1

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_2

Step: 3

blur-text-image_3

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

Object Databases The Essentials

Authors: Mary E. S. Loomis

1st Edition

020156341X, 978-0201563412

More Books

Students also viewed these Databases questions

Question

4. What action should Cherita Howard take and why?

Answered: 1 week ago