BlueBook - Equation
View as PDFBlueBook
Given the real coefficients  and 
 
, solve for 
in the following equation.
Be sure to output indeterminate and undefined whenever appropriate.
Remember  is indeterminate, and something like 
 is undefined.
Output the value of  rounded to two decimal places.
Input Specification
The input consists of two real numbers,  and 
. 
 and 
 will be on
separate lines, with 
 first, and 
 second.
Output Specification
Output the value of  according to the given values and equation. Be
sure to output 
indeterminate and undefined whenever appropriate.
Sample Input 1
10
5
Sample Output 1
-0.50
Sample Input 2
13.5555
1.244685
Sample Output 2
-0.09
Sample Input 3
0
0
Sample Output 3
indeterminate
Sample Input 4
0
4
Sample Output 4
undefined
Comments
I can't get through case 3
Note that a and b can be negative, -4 / 0 is still undefined, and your code doesn't output anything if either a or b is negative.
I cannot get through case 1. the rest of them i passed.
You have to print 2 decimal places.