Question: Complete this program, prompting the user to enter positove numbers a and b so that a is less than b 5 6 7 TwoNumbers.Java 1

Complete this program, prompting the user to enter positove numbers a and b so that a is less than b Complete this program, prompting the user to enter positove numbers a and

5 6 7 TwoNumbers.Java 1 import java.util.Scanner; 2 3 public class TwoNumbers 41 public static void main(String[] args) 1 Scanner in = new Scanner(System.in); 8 9 boolean - true; 10 11 1/ Keep prompting the user until the input is correct 12 System.out.println("Enter two positive integers, the first sneller than the sece 14 System.out.print("First: "); int a -in.nextInto: System.out.print("Second: "); 17 int b - in.nextInt(); 18 19 17 Only print thi's when the input to correct 20 21 System.out.println("You entered b): 13 15 16 ond

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!