Add a
import java.util.Scanner;public class Division{public static void main(String[] args){Scanner stdIn = new Scanner(System.in);int n, d, q;System.out.print("Enter numerator: ");n = stdIn.nextInt();System.out.print("Enter divisor: ");d = stdIn.nextInt();q = n / d;System.out.println(q);} // end main} // end Division classTo help you out, we’ve provided the catch block, below:catch (ArithmeticException e){System.out.println("Error, but keep going anyway.");}There’s no need to check for correct input; you may assume that the user enters two properly formatted
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.