Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Given integers numInput 1 and numInput 2 , output numInput 1 is positive. if numInput 1 is greater than 0 . End with a newline.

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." End with a newline.
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();
put your code here
System.out.println("numInput2 is "+ numInput2+".");
}
}

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

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

Advances In Databases And Information Systems 14th East European Conference Adbis 2010 Novi Sad Serbia September 2010 Proceedings Lncs 6295

Authors: Barbara Catania ,Mirjana Ivanovic ,Bernhard Thalheim

2010th Edition

3642155758, 978-3642155758

More Books

Students also viewed these Databases questions

Question

How much is $102 after a decrease of 100%?

Answered: 1 week ago

Question

1. Write down two or three of your greatest strengths.

Answered: 1 week ago

Question

What roles have these individuals played in your life?

Answered: 1 week ago

Question

2. Write two or three of your greatest weaknesses.

Answered: 1 week ago