Question: Write a program that reads integers userNum and divNum as input, and output the quotient ( userNum divided by divNum ) . Use a try
Write a program that reads integers userNum and divNum as input, and output the quotient userNum divided by divNum Use a try block to perform the statements. Use a catch block to catch any ArithmeticException and output an exception message with the getMessage method. Use another catch block to catch any InputMismatchException and output an exception message with the toString method.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
