Lab Exercise Modify the following program with do-while loop to allow the user continuously input number1 and number2 un
Posted: Sat May 14, 2022 6:39 pm
Lab Exercise Modify the following program with do-while loop to allow the user continuously input number1 and number2 until the input number2 is not 0. import java.util.Scanner; class QuotientWithExcpetion { public static void main(String[] args) { Scanner input = new Scanner(System.in); // Prompt the user to enter two Integers System.out.print("Enter two integers: "); int number1= input.nextInt(); int number2 = input.nextInt(); I try block try! System.out.println(number1 + "/" + number2 + "Is + (number1 / number2)) 1 Il catch block catch (ArithmeticException e) { System.out.println("Exception caught: Division by zero."): System.out.println("Finish"); ha