Java Exception Handling
Easy Accuracy: 37.4% Submissions: 749 Points: 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

to report an issue on this page.

Editorial

We strongly recommend solving this problem on your own before viewing its editorial. Do you still want to view the editorial?

Yes

All Submissions

My Submissions:

Login to access your submissions.