Question: 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!