User talk:Devid008

import java.io.*; class Divide {   public static void main(String args[]) throws IOException {       int a,b,res; BufferedReader br = new BufferedReader(new InputStreamReader (System.in)); String str; System.out.println("Enter Two numbers:"); str=br.readLine; a=Integer.parseInt(str); str=br.readLine; b=Integer.parseInt(str); try {            res=a/b; System.out.println("The Quotient="+res); }        catch(ArithmeticException ae) {            System.out.println("Exception As occcurred. You have Entered the divisor As 0"); }   } }

Enter Two numbers: 50 5 The Quotient=10

java practical 12
PRACTICAL :- 12

import java.io.*; class Divide { public static void main(String args[]) throws IOException { int a,b,res; BufferedReader br = new BufferedReader(new InputStreamReader (System.in)); String str; System.out.println("Enter Two numbers:"); str=br.readLine; a=Integer.parseInt(str); str=br.readLine; b=Integer.parseInt(str); try { res=a/b; System.out.println("The Quotient="+res); } catch(ArithmeticException ae) { System.out.println("Exception As occcurred. You have Entered the divisor As 0"); } } }

OUTPUT Enter Two numbers: 50 5 The Quotient=10 Devid008 (talk) 08:30, 11 October 2023 (UTC)