Question: String inputItem and integer itemNumber are read from input. Write a while loop that iterates until itemNumber is not between 2 0 and 4 5

String inputItem and integer itemNumber are read from input. Write a while loop that iterates until itemNumber is not between 20 and 45, both exclusive. In each iteration of the loop:
Read string inputItem from input.
Read integer itemNumber from input.
import java.util.Scanner;
public class PairedDataProcessing {
public static void main(String[] args){
Scanner scnr = new Scanner(System.in);
String inputItem;
int itemNumber;
inputItem = scnr.next();
itemNumber = scnr.nextInt();
/* Your code goes here */
System.out.println(inputItem +": is out of range!");
}
}

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!