 Java Exception Handling
Submissions: 478   Accuracy: 39.35%   Difficulty: Easy   Marks: 2

Given two integers (positive , negative or even 0) say a and b. Find the minimum value of a\$b where \$ is any arithmetic operation like multiply(*), Divide(/), Addition(+),Substraction(-). Use Exception Handling in this problem.

Input:
The first line will contain an integer (number of test cases). Each test case will contain two integers a and b.

Output:
Print the minimum value of a\$b.

Constraints:
1 < = T < = 100
-103<=a,b<=103

Example:
Input:

2
5 -5
4 0

Output:
-25
0

EXPLANATION:

In test case 1: 5*(-5) = -25
In test case 2: 4*0 = 0

** For More Input/Output Examples Use 'Expected Output' option **

Contributor: S_A
Author: saksham0751

If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.

Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.

to report an issue on this page.