Computer Science, asked by Dsah7206, 1 year ago

Java program to calculate division and multiplication using exception handling

Answers

Answered by Anonymous
0
HEY MATE HERE IS YOUR ANSWER....


import java.io.*;

class program
{

public static void main(String args[]) throws IOException
{

int a, b, c=1,d=1;

BufferedReader br = new BufferedReader(new) InputStreamReader(System.in));

System.out.println("Enter the two numbers to add:");

a = Integer.parseInt(br.readLine());

b = Integer.parseInt(br.readLine());

c = a / b;
d=a*b;

System.out.println("division of two numbers=" + c);
System.out.println("multiplication of two numbers=" + d);


}

}
Similar questions