Question: Jump to level 1 Integer inputNum is read from input. Write a while loop that iterates until inputNum is equal to - 2 4 .

Jump to level 1
Integer inputNum is read from input. Write a while loop that iterates until inputNum is equal to -24. In each iteration of the loop:
Output "Not -24" and a newline.
Read integer inputNum from input.
Click here for example
import java.util.Scanner;
public class SimpleWhileLoop {
public static void main(String[] args){
Scanner scnr = new Scanner(
System.in);
int inputNum;
inputNum =5cnr* nextInt ();
System.out.println("Encountered -24!");
}
}
 Jump to level 1 Integer inputNum is read from input. Write

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!